Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom error pages
Message
From
07/11/2006 10:28:37
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Custom error pages
Miscellaneous
Thread ID:
01167657
Message ID:
01167657
Views:
53
Hello Team, I am obviously doing something wrong ... Why do I get the default IIS error pages given the following code:
Context.Response.Clear();
Context.Response.StatusCode = 403;
Context.Response.End();

and a web.config that has:

<customErrors mode="On" defaultRedirect="defaultError.htm">
   <error statusCode="404" redirect="~/NotFound.aspx" />
   <error statusCode="403" redirect="~/NoAccess.aspx" />
</customErrors>
My thanks in advance,
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Next
Reply
Map
View

Click here to load this message in the networking platform