When I browse http://localhost:8004/elmah.axd it shows the errors that occurred in the application, but it also generates 404 error. How I will stop this 404 error?
Details of 404 error is:
System.Web.HttpException (0x80004005): File does not exist.
at System.Web.StaticFileHandler.GetFileInfo(String virtualPathWithPathInfo, String physicalPath, HttpResponse response)
at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context, String overrideVirtualPath)
at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
My web config file is like:
< configuration >
< configSections >
< sectionGroup name="elmah" >
< section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
< section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
</ sectionGroup >
</ configSections >
< system.web>
< compilation debug="true" targetFramework="4.0" />
< httpHandlers >
< add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
</ httpHandlers >
< httpModules>
< add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
</ httpModules>
< authentication mode="Forms" >
< forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</ authentication >
..........
..........
</ system.web >
< system.webServer >
< modules runAllManagedModulesForAllRequests="true" />
< validation validateIntegratedModeConfiguration="false" />
< modules >
< add name="Elmah.ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
</ modules >
< handlers >
< add name="Elmah" path="elmah.axd" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />
</ handlers >
</ system.webServer >
< elmah>
< security allowRemoteAccess="0" />
< errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/ErrorLogs" />
</ elmah >
</ configuration >