I am trying to access the Word Office Interop on a server from my aplication using the following line:
Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application();
This however causes an exception to be throw:
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-0000开发者_C百科00000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
Does anyone know what I can do to allow my program to access this?
You need to grant permission to 'Launch and Activate' for the user running IIS.
Start-->Run-->dcomcnfg
Under Component Services\Computers Right-Click 'My Computer'
Permissions are under COM Security
精彩评论