0

I have an ASP.NET website on IIS and it generates Excel files automatically, the problem is I keep getting this error:

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

I have tried almost everything on the net to solve this problem but I couldn't: I have changed the DCOM configurations of Excel for the user used for the website, created Desktop folder in System32 and SysWOW64 with full control for the same user, I even changed the security settings of the Miscrosoft Office installation folder to the same user but with no luck.

In my case my website connects to another server with SQL Server Reporting Service to retrieve some reports so if I change the user the website uses to "LocalSystem" user I can't fetch reports from the second server but I can generate Excel files.

So the solution might be one of two: either I can create the Excel files with this user or retrieve reports from the second server as a "LocalSystem" user.

halfer
  • 19,824
  • 17
  • 99
  • 186
Sami
  • 5,819
  • 1
  • 23
  • 30
  • http://technoblogy.net/retrieving-the-com-class-factory-for-component-with-clsid-00024500-0000-0000-c000-000000000046-failed-due-to-the-following-error-80040154/ – David Brabant Feb 27 '13 at 08:01

2 Answers2

0

I had a same problem. Here is the solution for the same.

Go to your IIS Manager. → ApplicationPools → AdvancedSettings → Enable32BitApplication → True.

Also give full access to your folder.

It might be helpful for you.

Azhar Mansuri
  • 665
  • 1
  • 7
  • 22
0

try to do the following:

  1. Make sure Office interop assemblies are installed.
  2. Check the version of the assemblies on development and production.
  3. Create Desktop folder under systemprofile.
  4. set the DCOM security explicitly for the service user.

you can find more details here

user3140982
  • 135
  • 1
  • 3
  • 8
  • 4
    Please include the relevant parts here. Answers with just links are not generally acceptable since links tend to die and/or be inaccessible to some. – chappjc Feb 21 '14 at 01:21
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Uyghur Lives Matter Feb 22 '14 at 17:07