2
votes

I am exporting data to Word file using some interops dll's. earlier I have developed the applicaion in Windows 2008 Server, at that time I could able to export the data to Word file. but recently I have upgraded my pc to Windows 7. It is working fine in my localhost.

When i deploy the application in IIS I am getting this error:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

3

3 Answers

2
votes

I had problems with the interop lib in a Windows Server 2003. I was trying to create a excel file through the .NET application. It worked in local but in the server. This links explain how to solve the problem. First at all you have to install M.O.Excel at the Server. Configure in DCOM the Microsoft Excel application.

http://blog.crowe.co.nz/archive/2006/03/02/589.aspx

It saved me!!

0
votes

Take a look at ASP.NET and Access Error 80070005:

a. I first opened DCOMCNFG from the command prompt, opened Component Services, expanded Computers/My Computer/DCOM Config. Then I Selected Microsoft Excel Application, and in the resulting dialog selected Security tab. Under Security Tab I changed Launch and Activation Permissions to customize, Access Permissions to customize and configuration Permissions to customize. And in the all the three I selected the ASPNET account. b. I then Select the NEW Folder in Windows Explorer, opened the properties and under WebSharing tab I selected Share This Folder.

OR Error : 80070005:

The .DLL in the bin folder is just a COM interop assembly. The actual COM component must also be installed on the Web Server, so you should check that.

OR When creating word object error : Access is denied: 80070005 :

You can gain access to the Office components only throught manually created account, that has access to the office binary files. For example your own account.

0
votes

Fixing the security settings of Microsoft Excel Application in DCOM Config:

Control Panel > Administrative Tools > Component Services > Computers > My Computer > DCOM Config > Microsoft Excel Application

Right click to get properties dialog. Go to Security tab and customize permissions accordingly.

Source: https://social.msdn.microsoft.com/Forums/en-US/b6388275-b295-4e55-8c25-6d8788eac1ca/error-while-creating-excel-object