Reputation: 295
I create a error page in iis for 503 error. Now i stop my website application pool. i got the other page service unavailable not my custom error page. I also try to config in web.config. It's not working please help me..
tried 1
<httpErrors errorMode="Custom">
<remove statusCode="503" subStatusCode="-1" />
<error statusCode="503" prefixLanguageFilePath="" path="/503.htm"
responseMode="ExecuteURL" />
</httpErrors>
tried 2
<customErrors mode="On">
<error statusCode="503" redirect="~/503.htm"/>
</customErrors>
Upvotes: 0
Views: 1239
Reputation: 1743
if the site is stopped this means no instance is listening to requests to this site. thus it is not possible to do so by web.config.
If what you mean is to use a custom page for site maintenance, you can take use of the app_offline.htm file:
Taking an ASP.NET Site Offline with a Message http://weblogs.asp.net/pleloup/archive/2008/09/22/taking-an-asp-net-site-offline-with-a-message.aspx
Upvotes: 2