Outlook Security
- Hi All.I am creating a windows service using C# and the service contains a code declares an instance of outlook application (Microsoft.Office.Interop.Outlook.ApplicationClass oApp = (Microsoft.Office.Interop.Outlook.ApplicationClass)new Microsoft.Office.Interop.Outlook.Application();), in order to get some outlook messages.but only after install this service and declare this object an problem encountered by windows.I believe its a security issue and I tried to apply Trusted security to act as Add-in but nothing happened.Now what ... I dont know .... any help is really appreciated ....Thanks ....
Answers
- Thoughts:
- As I discuss on my blog .Net Trust Tribal Knowledge one way to turn off caspol security is to do caspol -s off on the command line. By doing that one can determine if it is related to Caspol security.
- The other is that outlook is primarily a gui type operation. Running it from a service may have its own problems. Can you run the same code in a console application?
- A service is run, not as a user but a service account, make sure that service account has proper rights to folders and resources which it may need.
- Why use the antiquated interops? If the exchange server is running Exchange 2007 SP1, one can use Exchange Web Services to retrieve emails. Why not do that for th eservice and avoid the hassle of interops. Again on my blog I have an article: C#: Getting All Emails From Exchange using Exchange Web Services to get one started.
This question won't get much action in the C# group...try posting it in the Discussions in Office Development or Discussions in Automation forum for interop questions.
William Wegerson (www.OmegaCoder.Com )- Marked As Answer byHarry ZhuMSFT, ModeratorFriday, November 13, 2009 2:16 AM
All Replies
- Thoughts:
- As I discuss on my blog .Net Trust Tribal Knowledge one way to turn off caspol security is to do caspol -s off on the command line. By doing that one can determine if it is related to Caspol security.
- The other is that outlook is primarily a gui type operation. Running it from a service may have its own problems. Can you run the same code in a console application?
- A service is run, not as a user but a service account, make sure that service account has proper rights to folders and resources which it may need.
- Why use the antiquated interops? If the exchange server is running Exchange 2007 SP1, one can use Exchange Web Services to retrieve emails. Why not do that for th eservice and avoid the hassle of interops. Again on my blog I have an article: C#: Getting All Emails From Exchange using Exchange Web Services to get one started.
This question won't get much action in the C# group...try posting it in the Discussions in Office Development or Discussions in Automation forum for interop questions.
William Wegerson (www.OmegaCoder.Com )- Marked As Answer byHarry ZhuMSFT, ModeratorFriday, November 13, 2009 2:16 AM


