Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: raising an http error

Reply
Thread Tools

Re: raising an http error

 
 
Brock Allen
Guest
Posts: n/a
 
      04-14-2005
System.Web.HttpException

-Brock
DevelopMentor
http://staff.develop.com/ballen



> No, I'm looking more for something I can set in code, like
>
> Throw New System.Exception("404")
>
> in my code behind module.
>
> "" wrote:
>
>> Are you looking for this?
>>
>> <configuration>
>> <system.web>
>> <customErrors defaultRedirect="/errors/default.aspx"
>> mode="RemoteOnly">
>> <error statusCode="404" redirect="/errors/404.aspx" />
>> </customErrors>
>> </system.web>
>> </configuration>
>> This redirects a user to a specified page whenever a 404 code is
>> gotten. Of course this I believe only for any file type registered
>> with asp.net. Meaning that if you need it to detect other things then
>> you should edit your IIS Config for the application and specify a
>> custom 404.
>>
>> Response.Status can be used to set the custom response outputted to
>> the client.
>>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP SOAP/HTTP GET/HTTP POST milan_9211 Software 0 01-10-2011 02:10 PM
The Web server reported the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/822319ev1'. 'HTTP/1.1 500 Internal Server Error'. chanmm ASP .Net 2 09-07-2010 07:37 AM
Web Service Error : URL:'http://localhost/WebService1. HTTP/1.1 302 Found" hendy ASP .Net Web Services 0 12-20-2005 08:49 AM
URL: 'http://localhost/WebProject1', 'HTTP/1.1 500 Server Error' larkpics ASP .Net 9 10-22-2005 11:00 AM
Getting "HTTP Error 403 - Forbidden" at http://localhost/quickstart/ASPPlus/ Scott MCSD 1 08-04-2004 05:28 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57