Please help, how to read error message IIS7

Discussion in 'C#' started by JJnacy, Jun 3, 2009.

  1. #1
    My hosting was II6 and I can easily see when error messages appeared.
    So the error messages can help me find out where are the mistakes.

    Now I switch to IIS7 and feel it is faster.
    But all error messages are showing the same as the following note:

    Server Error
    500 - Internal server error.
    There is a problem with the resource you are looking for, and it cannot be displayed.

    Now my question is:
    Where I can find all these real error details?
    Or can I make an ASP script so only I can see the real errors details.


    Thanks/Regards
     
    JJnacy, Jun 3, 2009 IP
  2. dopanel.com

    dopanel.com Peon

    Messages:
    93
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
  3. workhomer

    workhomer Peon

    Messages:
    4
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Are we talking about catching exceptions in the code or just in the browser?
    If it's about code you should use Try Catch blocks and it's browser then you should enable the friendly error messages.
     
    workhomer, Jun 15, 2009 IP
  4. JJnacy

    JJnacy Peon

    Messages:
    448
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    while I use II6 the error messages do show which line# has what kind problem so I can easy to find find which line.

    but when I use II7 it not showing which line has problem

    I like II7 can show which line has problem.

    Thanks,
     
    JJnacy, Jun 18, 2009 IP
  5. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #5
    I used to have this problem and because I was on shared hosting I don't think there is much you can do unless you contact your host. But I remember it did make debugging so much more difficult.

    If you have access to the server or have IIS installed locally I'm sure that you could configure it to show the full error message.
    These posts: http://bytes.com/groups/asp/841333-classic-asp-using-iis7-error-500-a may help if that is the case.
    But you don't want to leave it on if the website is accessible by the public, because if an error is thrown they will be able to see parts of the code which could be an issue with security e.g the database password.
     
    camjohnson95, Jun 20, 2009 IP
  6. Corwin

    Corwin Well-Known Member

    Messages:
    2,438
    Likes Received:
    107
    Best Answers:
    0
    Trophy Points:
    195
    #6
    If you can set a custom Error 500 page, you can redirect all errors to that page and have them emailed to you. This is an invaluable tool for debugging any website.

    In any case, this is completely up to your web hosting company.
     
    Corwin, Jun 20, 2009 IP