GetObjectContext and ASP 
Author Message
 GetObjectContext and ASP


Quick question:  I am writing a logging component for use in web pages.  The
object uses GetObjectContext to set references to Session, Server, Request,
Response etc. objects as shown below.  What happens if this component is
called from something other than a web site, where those objects don't
exist?  How would you error-check this condition?  I'm configuring this as a
COM+ Application, so if it crashes, will other visitors be affected?  When
the Application Timeout setting is reached, will that "fix" the crash?


Private Sub Class_Initialize()
    Set objCtx = GetObjectContext

    Set Request = objCtx.Item("Request")
    Set Response = objCtx.Item("Response")
    Set Server = objCtx.Item("Server")
    Set Session = objCtx.Item("Session")
    Set Application = objCtx.Item("Application")

    Set oConn = New ADODB.Connection
    Set rstLog = New ADODB.Recordset

    nLogLevel = conDefaultLogLevel

    Me.Connection = Application("AspLog.ConnectionString")

End Sub

Sun, 24 Oct 2004 09:07:09 GMT  
 [ 1 post ] 

 Relevant Pages 

1. getObjectContext returns Nothing - VB 6 ASP

2. ASP Request object and GetObjectContext in VB DLL

3. ASP Request object and GetObjectContext in VB DLL

4. Error from GetObjectContext.CreateInstance("...")

5. GetObjectContext.CreateInstance vs. new

6. Bug with the GetObjectContext() and Application???

7. getObjectContext returns empty!

8. GetObjectContext

9. VB--- error using GetObjectContext.Item("Request")

10. VB6--- error using GetObjectContext.Item("Request")

11. concept of using getObjectContext

12. DLLs that Use GetObjectContext and Response crash in Debug


Powered by phpBB® Forum Software