Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to troubleshoot "System.Web.HttpException (0x80004005): File does not exist"?
    primarykey
    data
    text
    <p><em>Apologies if this has already been answered on this site, I searched but did not find this exact scenario.</em></p> <p>I'm adding log4net to a WCF service. I added a handler in the Application_Error event, and it is catching a file not found error on every request.</p> <p>I've seen this with web sites, and usually the error can be traced down to not having a "favicon" file in the root directory, or to a missing image referenced in a css stylesheet.</p> <p>However, this is a WCF service, there is no CSS stylesheet, and adding a favicon to the root did not solve the problem.</p> <p>Does anyone else have a good way to troubleshoot this? </p> <p>Some clues:</p> <ul> <li>I haven't deployed this yet to the real IIS server, I'm running it locally.</li> <li>The error does not happen when I am running in DEBUG inside Visual Studio, only when I access the service from a web browser (IE or Chrome)</li> <li><p>I added the url and file path to the error message, and this is what they are:</p> <p><strong>URL:</strong> <a href="http://localhost:3994/" rel="noreferrer">http://localhost:3994/</a> </p> <p><strong>FilePath:</strong> / </p> <p><strong>Error:</strong> System.Web.HttpException (0x80004005): File does not exist.</p></li> </ul> <p>Edit: the above values are what show up in the logged exception:</p> <pre><code>protected void Application_Error(object sender, EventArgs e) { var objErr = Server.GetLastError().GetBaseException(); if (objErr is System.Web.HttpException) { var filePath = Context.Request.FilePath; var url = ((HttpApplication) sender).Context.Request.Url; Log.Error("URL: " + url + "; FilePath: " + filePath, objErr); } else Log.Error("Application Error", objErr); } </code></pre> <p>Any help would be greatly appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload