Since some time I happened to get a nasty exception in the global.asax Application_Error method. Exception details are below:
Type : System.Web.HttpException
Message : File does not exist.
Source : System.Web
ErrorCode : -2147467259
Data : System.Collections.ListDictionaryInternal
TargetSite : Void ProcessRequestInternal(System.Web.HttpContext)
Stack Trace :
at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context)
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)
After some hard time trying to resolve this bug, I finally figured out what the problem was. The problem related to this exception is an HttpRequest to a non-existing source, not being the main request, but something like an image or iframe source. In my case, it was an iframe source loaded with a non-existing document.
To resolve this exception at your place, add the following to your Watch window: ((HttpApplication)sender).Context.Request.Url
and set a breakpoint on the Application_Error method. This way, the exception will clarify itself a lot (it definitely did for me).
Thanks a lot !!
Thanks! Depening on your config you may have to qualify the HttpApplication – ((System.Web.HttpApplication)Sender).Context.Request.Url – Problem was the favicon.ico. Never would hae figured that out without your help
You are welcome !
thanks!!
@Bob
Sorry for being late on answering. Problem is that I’m running at some deadlines …
The URL in the watch is the URL of the file the system cannot find, therefore, in my opinion that still equals the file that cannot be found .
Hope that helps!
I’m having the same problem but I’m not seeing how your solution fixes it. Lot’s of ppl are on here thanking you which tells me I’m missing something.
I can’t figure out what file my system cannot find.
Is there a specific property under ((HttpApplication)sender).Context.Request.Url that shows the missing file?
This is really a great tip. Thank you very much !!!
You rock! Thanks for sharing, excellent tip.
THANK YOU!
THANK YOU! Damn that was annoying me
Thanks. This was quite annoying to find!
thanks a lot bert… my database table was just filling up madly with this exception… it helped a lotttttttt again thanks
Thanks a lot !!!
Thanks a Lot.
Thanks a lot!!
YOU F’ing ROCK DUDE! I been trying to figure this one out for awhile!!
BERT IS DA MAN!!!!!!!
WOOHOO!! Thanks my friend!!!
THANKS A LOT
In many cases this misterious file is “favicon.ico”
(I got ‘http://localhost:5086/favicon.ico’ while debugging)
Just add any empty icon into website root directory if you have no
THANK YOU!!!!
I had this problem for a long time, and now it’s resolved!
I’m your fan now =)
Sleza4e
This was helpful to me. Thank you.
Thank you very much! This was very helpful.
Thank you!
You’re welcome !
thank you!