Blog Site

 Error

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. You don't have Add and Customize Pages permissions required to perform this action. Correlation ID: 0dbdfd9e-1019-f008-e1ec-d196f114eaaf.
Dec 09
Word Automation in ASP.NET

Automating Microsoft Office Word 2010 is very easy and very detailed for any windows application or even when running an ASP.NET application inside the Web Server that comes with Visual Studio 2010 looks to be easy. However when we deploy our solution to a windows server 2003 or 2008 nothing works. The tweak is to touch some registry values and configure some DCOMs as explained on this post

http://forums.asp.net/t/1358207.aspx/1

  • First, use regedit (from the SysWOW64 folder) to search the registryfor the CLSID(s) related to the command "WINWORD.EXE /Automation" , you might find more than one of them.

    (in my case this was: {000209FE-0000-0000-C000-000000000046} and {000209FF-0000-0000-C000-000000000046})

    Under those keys in HKEY_CLASSES_ROOT\CLSID\, add a string value AppID = {same value as the IDs}

    Then under HKEY_CLASSES_ROOT\AppID\ create a new key (folder) for each of these IDs, and inside each of them add a string value: RunAs = Interactive User

    Next go to Dcomcnfg (from the SysWOW64 folder) and search for those IDs. (there might be a third ID related to Winword.exe), in my case this was {00020906-0000-0000-C000-000000000046}.
    Note all those IDs, then right click on each of them, Properties, Security, and edit both the launch & access permissions to add and give Network Service and Interactive full permissions.

Comments

There are no comments for this post.
​​
​​
All Material in this Website is Property of Remoting Coders. ©2003-2017 Remoting Coders. All rights reserved.

John Doe

Chat with us

Jane Smith
12:23 PM

Hi, I wanted to make sure you got the latest product report. Did Roddy get it to you?


Remoting Coders is typing a message...
All of our staff members are not available at the moment, please try again later, or leave your questions here and we'll back to you shortly.