httpErrors in web.config behave differently from IIS Manager Error Pages
I am trying to get my MVC application to display a page for Unauthorised access.
When using IIS Manager to do this, it works fine.
When using the web.config and the httpErrors section, it only displays a blank page.

The bizarre thing is, both routes seem to produce exactly the same result in IIS Manager. Namely, a 401 Error Page listing with exactly the same information:  
Status Code: 401  
Path: /home/unauthorised  
Type: Execute URL  
Entry Type: Local  

So if I set up the Error page using IIS Manager, the correct 401 page is displayed on the website. But if I try to do exactly the same thing in web.confog, I get a blank page.

This is how my web.config is setup:

    <httpErrors errorMode="Custom" existingResponse="PassThrough">
        <remove statusCode="401" subStatusCode="-1" />
        <error statusCode="401" prefixLanguageFilePath="" path="/home/unauthorised" responseMode="ExecuteURL" />
    </httpErrors>

Any help much appreciated.

Thanks
Stu


httpErrors in web.config behave differently from IIS Manager Error Pages
===

I am trying to get my MVC application to display a page for Unauthorised access.
When using IIS Manager to do this, it works fine.
When using the web.config and the httpErrors section, it only displays a blank page.

The bizarre thing is, both routes seem to produce exactly the same result in IIS Manager. Namely, a 401 Error Page listing with exactly the same information:  
Status Code: 401  
Path: /home/unauthorised  
Type: Execute URL  
Entry Type: Local  

So if I set up the Error page using IIS Manager, the correct 401 page is displayed on the website. But if I try to do exactly the same thing in web.confog, I get a blank page.

This is how my web.config is setup:

    <httpErrors errorMode="Custom" existingResponse="PassThrough">
        <remove statusCode="401" subStatusCode="-1" />
        <error statusCode="401" prefixLanguageFilePath="" path="/home/unauthorised" responseMode="ExecuteURL" />
    </httpErrors>

Any help much appreciated.

Thanks
Stu

