App_Offline.htm and Ajax.NET Professional
I read the nice article about the App_Offline.htm on Scotts blog. If you are using Ajax.NET Professional you can simply check in the callback function if there is any error. While the App_Offline.htm is placed in your web application you will get the res.error.status = 404. This indicates that the file you are trying to download (the request to your Ajax.NET method) could not be found. It would be nice to get a more AJAX enabled friendly error message while the web application is offline. In my local version I have added <!-- App_Offline.htm --> to my App_Offline.htm source which indicates the Ajax.NET Professional library to throw a different error event than http status 404. It would be nice if Microsoft would add such information to a http header like this:
HTTP/1.1 404 Not Found
Server: Microsoft-IIS/5.1
Date: Tue, 11 Apr 2006 09:33:10 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
X-AspNet-Status: Offline
Cache-Control: private
Content-Type: text/html
Content-Length: 3648
With this additional (or maybe optional) http header it would be easier to enable offline working for AJAX enabled web applications.
1 Comment
Comments have been disabled for this content.
Ingo said
That would be very nice, as I can see there is no way to get this information because no ASP.NET code is running.