Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When Site stop on IIS. I need to display some maintenance page

i have tried using "error-page" on IIS but its not working for me

<httpErrors>
        <remove statusCode="403" subStatusCode="-1" />
        <error statusCode="403" prefixLanguageFilePath="" path="/maintenance.html" responseMode="ExecuteURL" />
    </httpErrors>



i added this in my web.config still it is not working

Do you have any idea !

What I have tried:

i tried using
<httpErrors>
        <remove statusCode="403" subStatusCode="-1" />
        <error statusCode="403" prefixLanguageFilePath="" path="/maintenance.html" responseMode="ExecuteURL" />
    </httpErrors>



but it's not working at all
Posted
Updated 8-Aug-17 5:37am
Comments
Richard Deeming 2-Jun-17 11:00am    
List of HTTP status codes : 4xx Client errors[^]

IIS does not return a 403 error when a site is stopped or off-line.

And if you actually stop the site in IIS manager, nothing in the web.config is going to make any difference to what IIS returns.

 
Share this answer
 
C++
<pre lang="c#">
<httpErrors>
        <remove statusCode="403" subStatusCode="-1" />
        <error statusCode="403" prefixLanguageFilePath="" path="/maintenance.html" responseMode="ExecuteURL" />
</httpErrors>
 
Share this answer
 
Comments
CHill60 9-Aug-17 14:36pm    
In what way is this different to the original code?
<httpErrors>
        <remove statusCode="403" subStatusCode="-1" />
        <error statusCode="403" prefixLanguageFilePath="" path="/maintenance.html" responseMode="ExecuteURL" />
    </httpErrors>
 
Share this answer
 
v2
Comments
Richard Deeming 9-Aug-17 12:24pm    
Congratulations - you've demonstrated that you can copy part of the question, and post it as a "solution".

Not just once, but twice.

And even edit one of the copies for no reason.

You've just made it on to the "abusive / troll" list. Keep it up, and you'll soon be kicked off the site!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900