Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: SV: Re: problems with CDO Session, Exchange


Message #1 by Robbin Gille <robbin.gille@n...> on Thu, 2 Aug 2001 10:21:40 +0200
What happends if you close you mapisession on the Funtion 

Session_OnEnd?



I haven't really understand this with mapisessions, spo what does the

folowing 2 lines do=3D

strProfileInfo =3D "test"& vbLf & "iis_user"

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





-----Ursprungligt meddelande-----

Fr=E5n: torikaraage@e... [mailto:torikaraage@e...]

Skickat: den 1 augusti 2001 19:50

Till: ASP CDO

=C4mne: [asp_cdo] Re: problems with CDO Session, Exchange





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 =3D Session("MapiSession")

    objSession.Logoff

    Set objSession =3D Nothing

    Set Session("MapiSession") =3D 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 =3D "test"& vbLf & "iis_user"

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

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

>     Set oInbox =3D objSession.GetDefaultFolder(1)

>     If err.number <> 0 then

>         objSession.Logoff

>         Response.write("unsuccessful logon!")

>     Else

>         Set Session("MapiSession") =3D objSession   

>     End If

>     Set oInbox =3D Nothing

>     Set objSession =3D Nothing

>     Set strProfileInfo =3D 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