Asp. Net about cocould not load file or assembly 'Microsoft. Office. Interop. Excel, Version = 11.0.0.0, C

Source: Internet
Author: User

Cocould not load file or assembly 'Microsoft. Office. Interop. Excel, Version = 11.0.0.0, Culture = neutral, PublicKeyToken = 71e9bce111e9429c' or one of its dependencies.

There are two reasons for this problem:

1. "Excel 2003" is not installed in the system ";

2. "Excel 2003" is installed in the system, but it is not installed in GAC. (For details about GAC Global Assembly Cache, refer to the MSDN help .)

First of all, if the problem occurs due to the first reason, it is best to solve the problem, that is, install Microsoft Excel 2003.

In addition, it is caused by the second reason. There may also be two possible causes: one is to install in the Office.. Net Framework is installed before, and the other is missing the ".. Net programmable support ". Now we need to install Office 2003 PIA (Master Interop assembly) into GAC. The installation method and steps are as follows:

1) if the. Net Framework is not installed on the system, install it first. If it is already installed, perform step 2.

2) perform the "change" installation operation on the Office in "add or delete programs" and reinstall the missing installation. The procedure is as follows:

For example, add or delete an Office

For example, advanced user-defined applications

For example, select "run from local" or "Run all programs from local" from the drop-down menu of the ". Net programmable support" option ".

After the above steps, Office 2003 PIA will be installed in GAC. You can see from the following directory: "C: \ Windows \ assembly ", as a result, the problem described in the question is solved.

Similarly, you can refer to this method to reference other assembly in Asp.net for similar issues.

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.