How to deploy COM object Microsoft.Office.Interop to IIS so that my C# WCF service reference will work?

前端 未结 3 1193
执笔经年
执笔经年 2021-01-17 01:59

I am getting an error when trying to run my web application from IIS 7 on my local machine regarding Microsoft.Office.Interop.Outlook that is like the following...

3条回答
  •  迷失自我
    2021-01-17 02:43

    On my server SharePoint is installed and running under the account "Network Service". That would be a hidden account, that normally would not be allowed to run COM objects. If you go into IIS and see which App Pool it is using (under Advanced Settings). Then check the Identity of that pool. A friend had recommended that we run our SharePoint app pool (and other services) under a named account (like [domain]\svcSharepoint) so you can explicitly give permission. Otherwise, the Network Service account would show up as [domain][machine name]$ (note the $ at the end, meaning "hidden account").

    One other factor would be if you installed this on Server 2008 R2, because the UAC stuff is much stronger and would deny this kind of interaction for sure. Turning off the UAC is a little risky, but could be a winner.

    Last factor would be checking the DCOM configs for that COM object. [Start Menu, Administrator Tools][Component Services][DCOM Config]. Find Outlook by name or by GUID, Properites, Security.

提交回复
热议问题