I'v configure custom error pages. 404 error page works well but I have a problems with 500 error page.
Here is my web config sections:
<customErrors mode="On" redirectMode="ResponseRewrite">
<error statusCode="404" redirect="/Error404" />
<error statusCode="500" redirect="/Error500" />
</customErrors>
<httpErrors errorMode="Custom" existingResponse="Auto">
<remove statusCode="404" subStatusCode="-1" />
<remove statusCode="500" subStatusCode="-1" />
<clear/>
<error statusCode="404" path="/Error404" responseMode="ExecuteURL" prefixLanguageFilePath="" />
<error statusCode="500" path="/Error500" responseMode="ExecuteURL" prefixLanguageFilePath=""/>
</httpErrors>
But I'm getting simple page "Server Error in '/' Application."
If I change redirectMode="ResponseRewrite"
to redirectMode="ResponseRedirect"
than I'm getting my error page but url changes and lloks like 'error500/?aspxerrorpath=/CMSPages/PortalTemplate.aspx'. I need to avoid Url changes.
How can I get 500 error page work?