Why does app_offline.htm keep appearing in my web project?
This is a .NET 2.0 "feature"
http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx
http://www.codeproject.com/KB/aspnet/app_offline.aspx
"The easiest way around this is to never publish directly to your server. You shouldn't anyway... Publish to a local folder then copy the site up"
Do you use Visual Studio? http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=102778
By default the publish process places one in your destination directory but then deletes it when the publish process is done. Perhaps it is being prevented from deleting it when it tries to?
Here is an excerpt from the MSDN article here:
Before you copy application files, the Copy Web Site tool puts a file that is named App_offline.htm into the root directory of the target Web site. While the App_offline.htm file exists, any requests to the Web site are redirected to this file. The file displays a friendly message that tells clients that the Web site is being updated. When all Web site files have been copied, the Copy Web Site tool deletes the App_offline.htm file from the target Web site.
I'd guess that for some reason, there are two publish events somehow conflicting with each other?
The way I get around this is to use nant to build my solution and then copy just the stuff I want. I do indeed copy the app_offline file first, utilizing the feature, but then I manage when it gets copied and deleted.