Wednesday, February 14, 2007

ASP.NET 2.0 returns a HTTP 404 Error

ASP.NET 2.0 support a new feature, when you need to maintaince your web site, you can put a empty file named app_offline.htm to the site's folder, if this file's size is less than 512 bytes, all request will get a HTTP 404 error, or redirect to app_offline.htm.

I met a problem, I didn't have such a app_offline.htm file, but I always get a http 404 error under .net 2.0(Server OS: Win2003), later i know, the IIS6 prohibited .net 2.0, if you want to reenable it, you need to run "aspnet_regiis -i -enable" under C:\windows\Microsoft.NET\Framework\v2.0.50727, this simple trick spend me hours to solve
#- -

Today is Valentine's Day, I'm single, I have nothing to do except doing my work, four days later, that will be Chinese traditional festival, Sprint Festival, all of us are busy preparing for that.

Tonight I want to write something about chinese new year.

2 comments:

frog'sbrain said...

*Slaps own forehead* Missing that little '-enable' flag probably cost me an hour of trying to get my doggone application to run. Thanks for the tip!

Anonymous said...

life saver.