Hi,
This is what I now have in ApplicationHost.config:
<location path="mysite">
<system.webServer>
<httpErrors errorMode="DetailedLocalOnly" existingResponse="Replace" defaultResponseMode="ExecuteURL" defaultPath="/Public/Error.aspx">
<clear/>
<error statusCode="401" responseMode="ExecuteURL" path="/Public/Error.aspx?http=401" />
<error statusCode="404" responseMode="ExecuteURL" path="/Public/Error.aspx?http=404" />
<error statusCode="500" responseMode="ExecuteURL" path="/Public/Error.aspx?http=500" />
</httpErrors>
With or without this in web.config
<customErrors mode="RemoteOnly" defaultRedirect="/Public/Error.aspx"/>
it seems that ASP.NET is still trapping the errors. When I force a 401 I get the error page ASP.NET would give saying that detailed errors are not enabled remotely.
If I go back and set these in web.config:
<customErrors mode="RemoteOnly" defaultRedirect="/Public/Error.aspx">
<error statusCode="401" redirect="/Public/Error.aspx?http=401" />
<error statusCode="403" redirect="/Public/Error.aspx?http=403" />
<error statusCode="404" redirect="/Public/Error.aspx?http=404" />
<error statusCode="405" redirect="/Public/Error.aspx?http=405" />
<error statusCode="406" redirect="/Public/Error.aspx?http=406" />
<error statusCode="408" redirect="/Public/Error.aspx?http=408" />
<error statusCode="409" redirect="/Public/Error.aspx?http=409" />
<error statusCode="412" redirect="/Public/Error.aspx?http=412" />
<error statusCode="413" redirect="/Public/Error.aspx?http=413" />
<error statusCode="414" redirect="/Public/Error.aspx?http=414" />
<error statusCode="415" redirect="/Public/Error.aspx?http=415" />
<error statusCode="500" redirect="/Public/Error.aspx?http=500" />
<error statusCode="501" redirect="/Public/Error.aspx?http=501" />
<error statusCode="502" redirect="/Public/Error.aspx?http=502" />
<error statusCode="503" redirect="/Public/Error.aspx?http=503" />
<error statusCode="504" redirect="/Public/Error.aspx?http=504" />
<error statusCode="505" redirect="/Public/Error.aspx?http=505" />
</customErrors>
keeping tyhe same setup in ApplicationHost.config, and try to force a 401 error, I get redirected to my error page but with error 500??? Really weird, no idea what's going on.
I checked the Failed Requests log and I correctly get a 401 error there. Where is the 500 coming from??
Thanks for your time, really appreciate it.