Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom error pages
Message
From
10/12/2006 00:27:31
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01167657
Message ID:
01176379
Views:
6
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
Previous
Reply
Map
View

Click here to load this message in the networking platform