سؤال

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

هل كانت مفيدة؟

المحلول

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"/>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top