Question

Visual Web Developer 2010 Express. C#, MVC3.

Clicking F5 to debug.

It starts up the built-in ASP web server on http://localhost:50188/

The Output window tells me WebDev.WebServer40.EXE is loading loads of DLLs.

Up until yesterday it worked. Today all URLs give me a blank page!

All controllers (all that changed yesterday was one controller, and some of its views; but it was working yesterday after all those changes). Same results in two different browsers. Use a different port gives an error (Telling me that there is something listening on port 50188!!) No errors anywhere. Just 0 byte files received.

My question is What happened and how do I fix it?

More Info:

Rebooting the machine made no difference.

I also found the obj/Debug directory and deleted it. It got recreated next time I hit F5 to debug. Still exactly the same problem!

And I went back 24hrs, in git, and still the same problem. So I'm sure the problem is not being caused by any of my source files. (The .csproj file is in git too.)

Was it helpful?

Solution

Look for a file called app_offline.htm (in your web root directory). It is a zero byte file. If it exists then this is served instead of any of your content! (It is a great feature if you wanted to take your site down for maintenance - put a custom message in that file.)

The Fix: Simply delete it and your website starts working again!

It appears (and I'm not sure about this) that the file is put there automatically when both you and your website want to access the DB at the same time. It should be deleted again automatically. But I guess a crash of something might leave it behind. (To be honest, I think it would have been much wiser to put some content in app_offline.htm, explaining what it is and why it was automatically created. Quietly creating a zero-byte file is a tad sadistic...)

More information here: Why does app_offline.htm keep appearing in my web project?

And here: http://www.daniweb.com/web-development/aspnet/threads/215912/why-app_offline.htm-is-created-automatically-whats-the-mystery#

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top