asp.net - Custom error setting being ignored for locations denied in the web.config -
in asp.net 4 , mvc2 application have odd configuration error.
the web.config looks this:
<configuration> <location path="blockedpath"> <system.web> <authorization> <deny users="*" /> </authorization> </system.web> </location> <system.web> <customerrors mode="on" defaultredirect="~/error.aspx" /> </system.web> </configuration> visiting blocked location correctly denied, gives verbose error message iis don't want.
why doesn't serve configured custom error?
can control page serve when page access denied config?
according this blog post, iis7 trying helpful , likes steal custom errors pages , replace them own.
open error pages feature in iis , click edit feature settings on right hand menu. set detailed errors option have iis pass through whatever errors serve asp.net.
Comments
Post a Comment