I'm working on a personal website and I'm using webforms and .NET 3.5 and C#. I'm trying to get the custom error pages sorted but I can't get them to work properly. Not on my local IIS 7.5 as on the external server. It keeps prompting me with default IIS error pages when pages can't be found. How can it be fixed?
I've got the following section in my web.config
file defining the errorpages;
<customErrors mode="RemoteOnly" defaultRedirect="~/ERRORPAGES/Default.aspx" redirectMode="ResponseRewrite">
<error statusCode="403" redirect="~/ERRORPAGES/Default.aspx" />
<error status开发者_Python百科Code="404" redirect="~/ERRORPAGES/404.aspx" />
<error statusCode="400" redirect="~/ERRORPAGES/400.aspx" />
<error statusCode="500" redirect="~/ERRORPAGES/500.aspx" />
</customErrors>
Found out there was a problem with the server i was running. The host changed it and now online everything works as i expected it to be.
精彩评论