Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: problems with CDO Session, Exchange


Message #1 by torikaraage@e... on Wed, 1 Aug 2001 06:45:11
I have a Win2K server with IIS and CDO 1.21 installed (from Outlook 2000) 

on one box.  On another Win2K server is Exchange 2000 (no Outlook 

installed).  I have an asp application that logs into the Exchange box 

just fine the first time in the global.asa file:



Sub Session_OnStart

    Dim objSession

    Dim strProfileInfo

    Dim oInbox

    

    strProfileInfo = "test"& vbLf & "iis_user"

    Set objSession = Server.CreateObject("MAPI.Session")

    objSession.Logon "", "", False, False, 0, False, strProfileInfo

    Set oInbox = objSession.GetDefaultFolder(1)

    If err.number <> 0 then

        objSession.Logoff

        Response.write("unsuccessful logon!")

    Else

        Set Session("MapiSession") = objSession    

    End If

    Set oInbox = Nothing

    Set objSession = Nothing

    Set strProfileInfo = Nothing

End Sub



The problem is that once the session times out (~20 minutes right now), 

and it tries to create a new session, I get the following error:



Error Type:

Collaboration Data Objects (0x43F)

[Collaboration Data Objects - [E_INVALIDARG(80070057)]]

//global.asa, line 21



Thereafter, no one can view the web page.  



Any ideas why?  Thanks in advance.



-Steve



Message #2 by torikaraage@e... on Wed, 1 Aug 2001 17:49:56
I should mention that line 21 is the objSession.Logon line.



And the onEnd function looks like this:





Sub Session_OnEnd 

    Dim objSession

  

    Set objSession = Session("MapiSession")

    objSession.Logoff

    Set objSession = Nothing

    Set Session("MapiSession") = Nothing

End Sub





> I have a Win2K server with IIS and CDO 1.21 installed (from Outlook 

2000) 

> on one box.  On another Win2K server is Exchange 2000 (no Outlook 

> installed).  I have an asp application that logs into the Exchange box 

> just fine the first time in the global.asa file:

> 

> Sub Session_OnStart

>     Dim objSession

>     Dim strProfileInfo

>     Dim oInbox

>     

>     strProfileInfo = "test"& vbLf & "iis_user"

>     Set objSession = Server.CreateObject("MAPI.Session")

>     objSession.Logon "", "", False, False, 0, False, strProfileInfo

>     Set oInbox = objSession.GetDefaultFolder(1)

>     If err.number <> 0 then

>         objSession.Logoff

>         Response.write("unsuccessful logon!")

>     Else

>         Set Session("MapiSession") = objSession    

>     End If

>     Set oInbox = Nothing

>     Set objSession = Nothing

>     Set strProfileInfo = Nothing

> End Sub

> 

> The problem is that once the session times out (~20 minutes right now), 

> and it tries to create a new session, I get the following error:

> 

> Error Type:

> Collaboration Data Objects (0x43F)

> [Collaboration Data Objects - [E_INVALIDARG(80070057)]]

> //global.asa, line 21

> 

> Thereafter, no one can view the web page.  

> 

> Any ideas why?  Thanks in advance.

> 

> -Steve

> 


  Return to Index