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

最后都变了- 提交于 2019-12-13 04:15:56

问题


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.


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/15106809/retrieving-the-com-class-factory-for-component-with-clsid-00024500-0000-0000-c0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!