Bizarre Error Log: system. Web. staticfilehandler. getfileinfo

Source: Internet
Author: User

In order to give the user an acceptable prompt interface when there is a problem with the system, and provide the first-hand information for later maintenance to write error logs
Captures and records at the global level in the web system.

[CSHARP]View plaincopyprint?

    1. Protected void application_error (Object sender, eventargs E)
    2. {
    3. Exception EX = server. getlasterror (). getbaseexception ();
    4. If (ex! = NULL)
    5. Pubfunction. errorlogprint (ex. stacktrace + ":" + ex. targetsite. Name, Ex. Message); // write the Error Log
    6. Response. Redirect ("~ /404. aspx "); // steering prompt page
    7. }

Protected void application_error (Object sender, eventargs e) {exception EX = server. getlasterror (). getbaseexception (); If (ex! = NULL) pubfunction. errorlogprint (ex. stacktrace + ":" + ex. targetsite. Name, Ex. Message); // write the Error Log Response. Redirect ("~ /404. aspx "); // steering prompt page}
Only in the last two days, a large number of logs are recorded in the error log as follows:

[HTML]View plaincopyprint?

  1. ----------------------------- 2012-03-22 17:08:57 ---------------------------
  2. Statement where an error occurs: In system. Web. staticfilehandler. getfileinfo (string virtualpathwithpathinfo, string physicalpath, httpresponse response)
  3. In system. Web. staticfilehandler. processrequestinternal (httpcontext context)
  4. In system. Web. defaulthttphandler. beginprocessrequest (httpcontext context, asynccallback callback, object state)
  5. In system. Web. httpapplication. callhandlerexecutionstep. system. Web. httpapplication. iexecutionstep. Execute ()
  6. In system. Web. httpapplication. executestep (iexecutionstep step, Boolean & completedsynchronously): getfileinfo
  7. Error message: the file does not exist.
  8. ----------------------------- 2012-03-22 17:09:26 ---------------------------
  9. Statement where an error occurs: In system. Web. staticfilehandler. getfileinfo (string virtualpathwithpathinfo, string physicalpath, httpresponse response)
  10. In system. Web. staticfilehandler. processrequestinternal (httpcontext context)
  11. In system. Web. defaulthttphandler. beginprocessrequest (httpcontext context, asynccallback callback, object state)
  12. In system. Web. httpapplication. callhandlerexecutionstep. system. Web. httpapplication. iexecutionstep. Execute ()
  13. In system. Web. httpapplication. executestep (iexecutionstep step, Boolean & completedsynchronously): getfileinfo
  14. Error message: the file does not exist.

----------------------------- 2012-03-22 17:08:57 ----------------------------- the wrong statement occurs: in the system. web. staticfilehandler. getfileinfo (string virtualpathwithpathinfo, string physicalpath, httpresponse response) in system. web. staticfilehandler. processrequestinternal (httpcontext context) in system. web. defaulthttphandler. beginprocessrequest (httpcontext context, asynccallback callback, object state) in system. we B. httpapplication. callhandlerexecutionstep. system. web. httpapplication. iexecutionstep. execute () in system. web. httpapplication. executestep (iexecutionstep step, Boolean & completedsynchronously): getfileinfo error message: the file does not exist. ----------------------------- 2012-03-22 17:09:26 ----------------------------- the wrong statement occurs: in the system. web. staticfilehandler. getfileinfo (string virtualpathwithpathinfo, string physicalpath, httpresponse response) in system. web. staticfilehandler. processrequestinternal (httpcontext context) in system. web. defaulthttphandler. beginprocessrequest (httpcontext context, asynccallback callback, object state) in system. W EB. httpapplication. callhandlerexecutionstep. system. web. httpapplication. iexecutionstep. execute () in system. web. httpapplication. executestep (iexecutionstep step, Boolean & completedsynchronously): getfileinfo error message: the file does not exist.

However, the website can work normally and does not go to the error page, which is very tangled.
1. Hit the breakpoint

[CSHARP]View plaincopyprint?

    1. Exception EX = server. getlasterror (). getbaseexception ();

Exception EX = server. getlasterror (). getbaseexception (); in this section, you can check the variables in time and view the stack information without obtaining valuable information.
The following message is displayed at http://forums.asp.net/t/1360302.aspx.
2. During the debugging process, directly track the information at the level of server-> non-public members-> _ context-> request-> apprelativecurrentexecutionfilepath. In this information
Finally, the path of an image is found, and the path of the image has changed.
3. At the project level, find the place where the image is used and correct the path.

4. I finally stopped recording this error ......
Today there is another problem, and the error log is as old as the above log records, and it is hard to understand.
Similarly, find a new thing according to the above process "~ /Favicon. ICO "Is this a magic horse? I don't remember using it in my website.
Fortunately, find the information here ,"~ /Favicon. ICO "is the website icon, which is the small icon before the title in the page header.
It's easy to find the problem. Create an icon file and put it under the root directory of the website. This error log does not exist. When you browse the page of the website, there are icons.
The effect is as follows:
Logistics Distribution Network http://wlphw.com/QQ online: 471226865

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.