Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Custom error pages
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Custom error pages
Divers
Thread ID:
01167657
Message ID:
01167657
Vues:
52
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

Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform