. NET create a Windows service to complete the bulk export function (Error fast)

Source: Internet
Author: User

    • Unable to open computer "." On the service control manager. Additional privileges may be required for this operation.
    • A COM object of type ' Microsoft.Office.Interop.Word.ApplicationClass cannot be cast to an interface type ' Microsoft.office.interop.word._ Application ".
    • Rejected Safe Mode action:microsoft Office Word

The above errors are often encountered in the local debugger, and do not contain errors can be found in the [Computer Management]→[System Tools]→[Event Viewer]→[window log]→[application] list to find clues, and then Baidu can generally be resolved: D

Unable to open computer "." On the service control manager. Additional privileges may be required for this operation.

Add the current user's authentication in Web. config:

<system.web>      <identity impersonate="true" username="  Administrator "password="123456"/></system.web>

A COM object of type ' Microsoft.Office.Interop.Word.ApplicationClass cannot be cast to an interface type ' Microsoft.office.interop.word._ Application ". This operation failed because the COM component call to the interface of the IID "{00020970-0000-0000-c000-000000000046}" QueryInterface failed because of the following error: not found. (Exceptions are from hresult:0x80030002 (Stg_e_filenotfound)).

1. Open Registry Editor using the command line "regedit"

2. Find hkey_classes_root\typelib\{00020813-0000-0000-c000-000000000046}\1.6, delete it, find hkey_classes_root\typelib\{ 00020905-0000-0000-c000-000000000046}\8.4, remove

3. The above operation to remove the registry is for system environments that use only Office2003

Rejected Safe Mode action:microsoft Office Word
Faulting application winword.exe, version 11.0.6568.0, Stamp 42e178a5, faulting module Mso.dll, version 11.0.6568.0, stamp 42e18ef6, Debug? 0, fault address 0x0003446c.

Right-click Service Properties, select ' Login ', enter current user name and password using ' This user '

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.