[thelist] ASP Err Object in IIS 5

Ken Kogler ken at kenkogler.com
Tue Apr 30 17:48:01 CDT 2002


It sounds like you haven't told IIS to call test.asp when a 500 error is
thrown.

If that's the case, I can walk you through that if you'd like.

-Ken

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org] On Behalf Of Tab Alleman
> Sent: Tuesday, April 30, 2002 5:13 PM
> To: thelist at lists.evolt.org
> Subject: [thelist] ASP Err Object in IIS 5
>
>
> I am trying (still) to get to "hello world" with the ASPError
> Object in
> IIS 5 (Not using .NET...yet.)
>
> Here's my test.asp script:
>
> -------------
>
> <%
> Option Explicit
> 'On Error Resume Next
> Dim oErr
> Dim oConn, rs, sql
> Set oConn = Server.CreateObject("ADODB.Connection")
> oConn.Open "xCentral"
>
> Set oErr = Server.GetLastError()
> Response.Write("<h3>Error Properties: </h3>")
> Response.Write("AspCode: " & oErr.ASPCode & "<br>" & _
> 				"Number: " & oErr.Number & "<br>" & _
> 				"Source: " & oErr.Source & "<br>" & _
> 				"Category: " & oErr.Category & "<br>" &
> _
> 				"File: " & oErr.File & "<br>" & _
> 				"Line: " & oErr.Line & "<br>" & _
> 				"Column: " & oErr.Column & "<br>" & _
> 				"Description: " & oErr.Description &
> "<br>" & _
> 				"ASPDescription: " & oErr.ASPDescription
> & "<br>" & _
> 				"<br>")
>
> Set oErr = Nothing
>
> sql = "SELECT * FROM SupplierRules"
> Response.Write("<h3>Debug: " & sql & "</h3>")
> Set rs = oConn.Execute(sql)
>
>
> Response.Write("<h3>Debug: " & rs.fields(0).value & "</h3>")
>
>
> rs.close()
> Set rs = Nothing
> oConn.Close()
> Set oConn = Nothing
>
> %>
>
> Done.
>
> -------------
>
> With the "On Error.." line commented out (as shown), the page returns
> the following error, which is expected because I don't have a
> DSN named
> "xCentral":
>
> HTTP 500.100 - Internal Server Error - ASP error
> Internet Information Services
>
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
> [Microsoft][ODBC Driver Manager] Data source name not found and no
> default driver specified
> /test/Errors/test1.asp, line 7
>
> ----------
> But with error handling enabled, I get the following output:
>
> Error Properties:
> AspCode:
> Number: 0
> Source:
> Category:
> File:
> Line: 0
> Column: -1
> Description:
> ASPDescription:
>
>
> Debug: SELECT * FROM SupplierRules
> Done.
>
> ---------------
> In other words, the ASP error object is apparently NOT getting
> populated.
> Any idea why?  Is it because it's an OLE error which makes it not
> technically an ASP error?  Because that would be really lame... do I
> need a separate error handler for non-ASP ASP errors?  Grrrr...
>
> TIA,
> Tab
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>




More information about the thelist mailing list