C # dynamically generates word that can be executed locally, but an error solution is published to IIS

Source: Internet
Author: User

Error point: Microsoft.Office.Interop.Word.DocumentClass.SaveAs

Solution:

1. Enter Dcomcnfg.exe to start "Component Services" in "Start", "Run".

2. Double-click "My Computer", "Computer", "Component Services", and then "DCOM Configuration";

3. In "DCOM Config", find "Microsoft Word Application", right click on it, then click "Properties", pop Up "Microsoft Excel Application Properties" dialog box;

Click on the "Logo" tab and select "Interactive User";

4. Click on the "Security" tab, click "Customize" on "Launch and activation Rights", then click on the corresponding "edit" button to add a "NETWORK SERVICE" user in the "Security" dialog box (note To select this computer name) and give it "local launch" and "Local activation" Permissions. Add the ASPNET user to the XP system and the 2000 system;

5. Still the "Security" tab, click "Customize" on "Access", then click "Edit" and add a "NETWORK SERVICE" user to the "Security" dialog box, then give "Local access" permission.

6, finally need to add access to user rights, that is, not adminstrator permissions

Note: If the office2010 service is named Microsoft Word 97-2003 Document if it is office2003,2007 called Microsoft Word 97-2003 Documentation

Solution not found in DCOM configuration in Component Services if Win7 64 bit is installed after office2010

Solution:

Run the comexp.msc-32 command

C # dynamically generates word that can be executed locally, but an error solution is published to IIS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.