私は Log4Net を使用しており、ASP.NET アプリケーションがエラーをスローするたびにログを記録しています。
protected void Application_Error(object sender, EventArgs e)
{
Exception ex = Server.GetLastError();
Log.Error("An error occurred", ex);
}
残念ながら、アプリケーションのページにアクセスするたびにSystem.Web.HttpException
、「ファイルが存在しません」というメッセージが表示されます。
スタック トレースは次のとおりです。
bei System.Web.StaticFileHandler.GetFileInfo(String virtualPathWithPathInfo, String physicalPath, HttpResponse response)
bei System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context, String overrideVirtualPath)
bei System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state)
bei System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
bei System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
これをデバッグする方法がわかりません。これは、ASP.NET 開発サーバーと、デプロイした IIS 7.5 で発生します。