Connecting to an MS Exchange Server from VB .NET
hi,
I have a Windows Service written in VB .NET which connects to an Exchange Server and accesses the messages in the Public Folders. I am using Collaborative Data Objects to do this. When I run the service, I get the following error...
System.Runtime.InteropServices.COMException (0x80010106): [Collaboration Data Objects - [UNKNOWN_ERROR(80010106)]] at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) at MAPI.SessionClass.Logon(Object ProfileName, Object ProfilePassword, Object ShowDialog, Object NewSession, Object ParentWindow, Object NoMail, Object ProfileInfo) at EMailParser.EMailParser.EmailApp()
My logon method looks like this ...
oSession = New MAPI.Session
'** Logon to the Exchange Server **'
Try
oSession.Logon(, , , , , , server & vbLf & user)
Catch e As System.Runtime.InteropServices.COMException
EventLog1.WriteEntry(e.ToString())
End Try
Here "server" is the name of the Exchange Server and "user" is name of the mailbox account on the exchange server. This piece of code works perfectly on one exchange server and does what it is supposed to do but when it is run on another exchange server, it throws the above error. Both the exchange servers are running Service Pack 3.
Details about the error as obtained from the event viewer...
Event Type: Information
Event Source: MySource
Event Category: None
Event ID: 0
Date: 11/12/2003
Time: 11:11:28 AM
User: N/A
Computer: E2K1
Description:
System.Runtime.InteropServices.COMException (0x80010106): [Collaboration Data Objects - [UNKNOWN_ERROR(80010106)]]
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at MAPI.SessionClass.Logon(Object ProfileName, Object ProfilePassword, Object ShowDialog, Object NewSession, Object ParentWindow, Object NoMail, Object ProfileInfo)
at EMailParser.EMailParser.EmailApp()