Reputation: 9304
I have a Silverlight/ASP hosted app. When I start, I get the error:
HttpException occurred
File does not exist.
This just started happening yesterday, and I have no idea why. It's not even getting to my code, just internal calls starting with WebHost.Host.ProcessRequest.
Running VS2010, the app is .NET 4.0
I would appreciate any help- I have real bugs to fix ASAP!
Cheers, Daniel
Upvotes: 2
Views: 3640
Reputation: 9304
Got it, and here's how:
Run the app and immediately get the error
Turned on Call Stack Window (Debug->Windows->Call Stack)
Top of the stack is a call to System.Web.StaticFileHandler.GetFileInfo
Went to Locals Window (Debug->Windows->Locals) did not see anything meaningful there
Went up the stack once to ProcessRequestInternal
Looked in Locals Window, opened up variable called "context" browsed through properties... in ConfigurationPath I see a path to a file: /ClientBin/Images/pclogo.png
Sure enough, that image file not there!
Copy the file, and all is well. Whew!
Next just need to fix the project by making sure the image is treated as content. Still, such a slog to find an obvious and common error.
Upvotes: 9
Reputation: 21
I fixed the issue by looking at Daniel Williams solution. In my case it was looking for faviicon.ico This is when I debug using Chrome.
Upvotes: 2
Reputation: 123
In addition to what Daniel wrote, (which worked for me), since my SL4 app doesn't require ASP.NET, I simply unchecked the ASP.NET debugger from within the web app. The light bulb went off after realizing that SL4 doesn't support .ico files.
Upvotes: 1