Re: raising an http error

Discussion in 'ASP .Net' started by Brock Allen, Apr 14, 2005.

  1. Brock Allen

    Brock Allen Guest

    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.
    >>
     
    Brock Allen, Apr 14, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Smith

    raising events!

    David Smith, Dec 5, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    530
    David Smith
    Dec 5, 2003
  2. David Smith

    Help raising events

    David Smith, Dec 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    504
    David Smith
    Dec 8, 2003
  3. Dane Dickey

    Raising an Event via Code

    Dane Dickey, Jun 30, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    383
    Natty Gur
    Jul 1, 2003
  4. Kevin Spencer

    Re: raising event

    Kevin Spencer, Jul 31, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    415
    Kevin Spencer
    Jul 31, 2003
  5. Robert Brinson

    Raising BubleEvents

    Robert Brinson, Aug 29, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    420
    Robert Brinson
    Aug 29, 2003
Loading...

Share This Page