Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Custom error pages
Message
De
10/12/2006 00:27:31
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01167657
Message ID:
01176379
Vues:
7
This message has been marked as the solution to the initial question of the thread.
>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>
Have you considered using the Throw New HttpException approach such as:
        Throw New HttpException(404, "File Not Founded")
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform