0

I have a asp.net MVC application i am getting 500 - Internal server error. My code is working fine what i have figured out is whenever i am initializing the Microsoft word class then i am getting this error if i remove the initialization part then it works fine any suggestion??

 //Create new instance of word and create a new document Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.Application(); // Word.Document doc = null; //Properties for the new word document, so everything happens in the background. If this isn’t set all the word documents will be visible // object readOnly = false; // object isVisible = false; 

1 Answer 1

1

You must be missing Microsoft.Office.Interop.Word.dll or its dependent file from your deployment.

You can get detailed error message by disabling customErrors in web.config file of deployment

<configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration> 
Sign up to request clarification or add additional context in comments.

8 Comments

i have copied all references still the same problem
what is the error you are getting after disabling customerror?
500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
by default the ASPNET users does not have permissions to com, so assign User ASPNET with the permissions with required permission
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.