--> ASP.NET 2.0 - The Mysterious 404 - Impersonation Failure

ASP.NET 2.0 - The Mysterious 404

I ran into a problem with an existing ASP.NET 2.0 web project that had me cursing me machine for a while. No matter what I try any page in my solution I browse to returned a "The resource cannot be found." 404 error. When trying to debug to see if anything is actually executing I could see that no breakpoints would be hit which confused things even more.

A quick Google turned up the cause for this behavior -

Starting with ASP.NET 2.0 you can create a "magic" file called app_offline.htm which will take your application offline. Useful in cases where you want to take a database offline and there's still connections open from your application etc.

Deleted the file and everything worked like before. The file was left there from a previous Publish Website operation. Should the operation fail the file is not deleted.

Learned about the existance of this file the hardway but it's something useful to know should you want to take an application offline quickly...

More info :

powered by IMHO 1.2

Filed under: ,

Comments

# rajivpopat said:

i ran into a similar problem after i took a single application offline using the web based admin console. Do you know if there's any Ms. Provided ui by which you can take offline applications online again? Where would this .htm file you talk about exist?

Monday, July 11, 2005 10:38 AM
# Armand du Plessis said:

The file is located in the root of your site. I'm not sure about the web admin though.

Monday, July 11, 2005 11:15 AM
# Fernando Monteiro said:

Thank you very much, I had the same problem, spent and waste a few hours trying to understand what was happening, but the simple solution you posted here helped me to fix this weird problem.

Thanks again.

Monday, November 07, 2005 1:40 PM
# Steve said:

I could not find the file though. I can't figure it out what can cause this. (I am a tyro in asp.net). Can you suggest anything else?

Thursday, February 16, 2006 10:48 PM
# Benjamin Day Consulting, Inc.: The Blog said:
Thursday, May 17, 2007 12:06 AM
# refer to a public shared class in app_code folder | keyongtech said:

Pingback from  refer to a public shared class in app_code folder | keyongtech

Sunday, January 18, 2009 7:36 PM