Outlook with Window service?
-
I am working with the office outlook, it is working fine with console version, but when i use it with window service, it does not work. I am getting the following log entry Event Type: Error Event Source: Microsoft Office 11 Event Category: None Event ID: 2001 Date: 8/16/2006 Time: 6:38:46 PM User: N/A Computer: XYZ Description: The description for Event ID ( 2001 ) in Source ( Microsoft Office 11 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Microsoft Office Outlook, . Any idea???
-
I am working with the office outlook, it is working fine with console version, but when i use it with window service, it does not work. I am getting the following log entry Event Type: Error Event Source: Microsoft Office 11 Event Category: None Event ID: 2001 Date: 8/16/2006 Time: 6:38:46 PM User: N/A Computer: XYZ Description: The description for Event ID ( 2001 ) in Source ( Microsoft Office 11 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Microsoft Office Outlook, . Any idea???
Windows service runs in a separate user context, i think this is the root cause of the problem. Try running it under the same user as your console application (your login id). Also try turning on "allow this service to interact with the desktop" feature.
-
Windows service runs in a separate user context, i think this is the root cause of the problem. Try running it under the same user as your console application (your login id). Also try turning on "allow this service to interact with the desktop" feature.
Thanx for the reply but these solutions don't seem to work. The actual line of error is
Outlook.MAPIFolder objFolder; Outlook.NameSpace objNamespace; objFolder = objNamespace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);//HERE
here objFolder.Items.Count = 0. While in case of console application im getting the actual no of mails.