Pregunta

Please find attached the error I am getting while trying to display a custom error message. My application ASP.Net 4 and uses IIS 7.5. HEre is my code in web.config.

</httpErrors>

enter image description here

¿Fue útil?

Solución

You should have your this under system.web

<system.web>
    <customErrors mode="On" redirectMode="ResponseRewrite" defaultRedirect="~/ErrorPages/WebError.aspx"/>

And this under system.webServer (one of a few options)

<system.webServer>
    <httpErrors existingResponse="PassThrough"/>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top