Classic ASP using IIS7 - Error 500

Discussion in 'ASP General' started by Ryan Ritten, Sep 26, 2008.

  1. Ryan Ritten

    Ryan Ritten Guest

    Hey all,

    I am with godaddy for webhosting right now. The have me using IIS7.
    When I run my ASP page I get the error :

    Error 500 :There is a problem with the resource you are looking for,
    and it cannot be displayed.

    Basically, there is an error in my code, however, it doesn't tell me
    the line number the error was found on. After searching the web I
    found out how to turn on the more detailed error reporting... but you
    have to do it on the webserver. I don't have access to the webserver.

    After spending allot of time chatting with godaddy, they claim I can
    turn this on in the web.config file. I know this can be turn on for
    ASP.NET in the web.config file... but as far as I know, not classic
    asp.

    Am I wrong? Is godaddy right? How do i turn on error line numbers?

    Thanks so much,
    Ryan Ritten
    Ryan Ritten, Sep 26, 2008
    #1
    1. Advertising

  2. In the Web Browser on the machine you are sitting at:

    Internet Options-->Advanced Tab---> "uncheck" the box for "Show friendly
    HTTP error messages"

    You don't want "friendly" error messages. "Friendly" means "dumbed down".

    --
    Phillip Windell
    www.wandtv.com

    The views expressed, are my own and not those of my employer, or Microsoft,
    or anyone else associated with me, including my cats.
    -----------------------------------------------------

    "Ryan Ritten" <> wrote in message
    news:...
    > Hey all,
    >
    > I am with godaddy for webhosting right now. The have me using IIS7.
    > When I run my ASP page I get the error :
    >
    > Error 500 :There is a problem with the resource you are looking for,
    > and it cannot be displayed.
    >
    > Basically, there is an error in my code, however, it doesn't tell me
    > the line number the error was found on. After searching the web I
    > found out how to turn on the more detailed error reporting... but you
    > have to do it on the webserver. I don't have access to the webserver.
    >
    > After spending allot of time chatting with godaddy, they claim I can
    > turn this on in the web.config file. I know this can be turn on for
    > ASP.NET in the web.config file... but as far as I know, not classic
    > asp.
    >
    > Am I wrong? Is godaddy right? How do i turn on error line numbers?
    >
    > Thanks so much,
    > Ryan Ritten
    Phillip Windell, Sep 26, 2008
    #2
    1. Advertising

  3. There is no "web config" file or anything similar in ASP Classic. You have
    to write your error handling abilites directly into the ASP page you are
    working with. In some cases you might be able to do it with an Include file
    if the code is "reusable" across pages.

    Most of the error trapping involves "Response.write" with certain variables
    and using "Response.end" to create break points.


    --
    Phillip Windell
    www.wandtv.com

    The views expressed, are my own and not those of my employer, or Microsoft,
    or anyone else associated with me, including my cats.
    -----------------------------------------------------
    Technet Library
    ISA2004
    http://technet.microsoft.com/en-us/library/cc302436(TechNet.10).aspx
    ISA2006
    http://technet.microsoft.com/en-us/library/bb898433(TechNet.10).aspx

    Understanding the ISA 2004 Access Rule Processing
    http://www.isaserver.org/articles/ISA2004_AccessRules.html

    Troubleshooting Client Authentication on Access Rules in ISA Server 2004
    http://download.microsoft.com/download/9/1/8/918ed2d3-71d0-40ed-8e6d-fd6eeb6cfa07/ts_rules.doc

    Microsoft Internet Security & Acceleration Server: Partners
    http://www.microsoft.com/isaserver/partners/default.mspx

    Microsoft ISA Server Partners: Partner Hardware Solutions
    http://www.microsoft.com/forefront/edgesecurity/partners/hardwarepartners.mspx
    -----------------------------------------------------
    Phillip Windell, Sep 26, 2008
    #3
  4. Ryan Ritten

    Ryan Ritten Guest

    Thanks for your replies.

    I already had the "Show friendly HTTP error messages" unchecked. As
    for writing my own error messages, it's not possible when the page has
    an error. if the page has an error on it, it won't return anything to
    your brower except the standard "500 error page". So any
    document.writes will be ignored.

    Anyone else have any ideas?
    Ryan Ritten, Sep 27, 2008
    #4
  5. Ryan Ritten wrote:
    > Thanks for your replies.
    >
    > I already had the "Show friendly HTTP error messages" unchecked.


    Then the website is configured to send friendly messages. Tell godaddy to
    look again. In IIS6, it would be a matter of right-clicking the site's
    folder in IIS Mgr, clicking the Configuration button in the "Application
    Settings" section of the Directory tab, and clicking into the Debugging tab
    to find the "Send detailed error messages to client" radio button. I don't
    have IIS7 but I can't imagine the steps would be that different.

    > As
    > for writing my own error messages, it's not possible when the page has
    > an error. if the page has an error on it, it won't return anything to
    > your brower except the standard "500 error page". So any
    > document.writes will be ignored.
    >

    Not if you use "on error resume next" in your vbscript. Haven't you learned
    how to handle errors in vbscript? Basically it's just a matter of:

    'turn error-handling on:
    on error resume next
    <statement that might raise an error>
    'check if error occurred
    if err<>0 then
    'error occurred - handle it - I suggest logging it in a file
    'and sending a generic "error occurred" message to
    'the client to avoid aiding hackers - however, for the
    'sake of simplicity:
    response.write err.description
    response.end
    end if
    'turn off error handling - not a good idea to leave it on:
    on error goto 0

    You also might want to give this a read:
    http://support.microsoft.com/kb/299986/EN-US/

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Sep 27, 2008
    #5
  6. "Ryan Ritten" <> wrote in message
    news:...
    > Hey all,
    >
    > I am with godaddy for webhosting right now.


    My commiserations.

    It shouldn't be too difficult for you to find an alternative though. By
    taking your business away from GoDaddy you'll not only be getting yourself
    better hosting, you'll also be doing business with a company with more
    integrity (AFAIK, GoDaddy is still the #1 choice among spammers & scammers)

    - Bob.
    Bob Milutinovic, Sep 29, 2008
    #6
    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. JavaQueries
    Replies:
    1
    Views:
    3,651
    John C. Bollinger
    Mar 1, 2005
  2. James
    Replies:
    2
    Views:
    9,078
    Jacek Dziedzic
    Nov 3, 2004
  3. .Net Sports

    web.config file for IIS7 and classic asp

    .Net Sports, Sep 7, 2009, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    785
    .Net Sports
    Sep 7, 2009
  4. Kal
    Replies:
    10
    Views:
    598
    David Wang
    Sep 17, 2008
  5. Thomas
    Replies:
    1
    Views:
    1,384
    Thomas
    Aug 3, 2010
Loading...

Share This Page