我有一些Web服务应用程序,并且在它的
protected void Application_Error(object sender, EventArgs e) {
我遇到异常[System.Web.HttpException] = {"File does not exist."}
这是我踩到的第一个地方。
如何获取有关缺少文件的更多信息?
堆栈如下:
" at System.Web.StaticFileHandler.GetFileInfo(String virtualPathWithPathInfo, String physicalPath, HttpResponse response)\r\n at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context)\r\n at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state)\r\n at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()\r\n at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)"
非常感谢您的帮助
答案 0 :(得分:0)
向application_error方法添加断点,并在监视窗口中查看Server变量。如果你环顾四周,在不同的属性中有不同的相对和绝对路径,如
Server
- Non-Public Members
- _context
- Request
- AppRelativeCurrentExecutionFilePath"