Top VPS Hosting Provider

Welcome to the myhosting.com Forums.
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    hedache is offline Junior Member
    Join Date
    Apr 2011
    Posts
    1

    Default Error documents (500) on cloud account

    When my page has an error that creates a 500-Internal Server Error, I want to see the usual non friendly error message such as

    Code:
    Microsoft VBScript compilation error '800a03ea' 
    
    Syntax error 
    
    /test.asp, line 3 
    
    If then
    ---^
    First of all, let me mention that I have the Show friendly HTTP Errors unchecked in the browser. I can get the above message on a different domain that's not on the cloud account.

    In the cloud account that I just signed up for, I have tried many options in the webspace\website configuration\error documents tab.

    With the first two IIS Stadart options I get a generic message which is no use for me to debug any problem. I created a 500.asp page to handle errors and I tried two different pieces of code such as below.

    Code 1:
    Code:
    Dim objErrorInfo
    Set objErrorInfo = Server.GetLastError
    
    ErrTxt = ErrTxt & "ASPCode = " & objErrorInfo.ASPCode & "<br>"
    ErrTxt = ErrTxt & "ASPDescription = " & objErrorInfo.ASPDescription & "<br>"
    ErrTxt = ErrTxt & "Category = " & objErrorInfo.Category & "<br>"
    ErrTxt = ErrTxt & "Column = " & objErrorInfo.Column & "<br>"
    ErrTxt = ErrTxt & "Description = " & objErrorInfo.Description & "<br>"
    ErrTxt = ErrTxt & "File = " & objErrorInfo.File & "<br>"
    ErrTxt = ErrTxt & "Line = " & objErrorInfo.Line & "<br>"
    ErrTxt = ErrTxt & "Number = " & objErrorInfo.Number & "<br>"
    ErrTxt = ErrTxt & "Source = " & objErrorInfo.Source & "<br>"
    Response.Write ErrTxt
    Code 2:
    Code:
        On Error Resume Next
        Set objASPError = Server.GetLastError
        Response.Write Server.HTMLEncode(objASPError.Category)
        If Len(CStr(objASPError.ASPCode)) > 0 Then
            Response.Write Server.HTMLEncode(", " & objASPError.ASPCode)
        End If
        Response.Write Server.HTMLEncode(" (0x" & Hex(objASPError.Number) & ")" ) & "<br>"
        If Len(CStr(objASPError.ASPDescription)) > 0 Then 
            Response.Write Server.HTMLEncode(objASPError.ASPDescription) & "<br>"
        ElseIf Len(CStr(objASPError.Description)) > 0 Then 
            Response.Write Server.HTMLEncode(objASPError.Description) & "<br>" 
        End If
    Both of these return a blank section for what they should output. It seems like there is no error according to the code but there is. Do I have any options that I'm missing? Why isn't the ASP error object seem like it's not working?

  2. #2
    tima is offline Administrator
    Join Date
    Apr 2008
    Posts
    191

    Default

    Hi There,

    I'd suggest starting with a more simplified code, perhaps something like this:

    Code:
    <%
    Set ASPErr = Server.GetLastError 
    Response.Write ASPErr.Description 
    %>
    If that doesn't work, I would suggest contacting our Customer Support team with your account information, so they can troubleshoot any potential issues with your account.

    24/7 In-House Phone Support | myhosting.com
    Tim Attwood
    Product Manager
    myhosting.com

  3. #3
    Stoddard is offline Master Member
    Join Date
    May 2010
    Posts
    559

    Default

    Good point. I always find the simpler the code is, the fewer headaches it creates--and simplified code can be just as productive, too.


 

Similar Threads

  1. 500 Errors for ticketing system
    By ssusslin in forum Troubleshooting
    Replies: 1
    Last Post: 2011-02-11, 01:14 AM
  2. New account
    By bids2rescue in forum Virtual Server
    Replies: 2
    Last Post: 2010-11-05, 08:49 PM
  3. Slate 500
    By WrigleyF in forum News, Announcements, and Notices
    Replies: 0
    Last Post: 2010-10-22, 09:23 AM
  4. 500
    By Rusher in forum Troubleshooting
    Replies: 1
    Last Post: 2010-08-09, 02:54 PM
  5. 500 million
    By Randy5 in forum News, Announcements, and Notices
    Replies: 2
    Last Post: 2010-07-20, 06:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts