本文介绍了托管时的ASP.Net Com-InterOp Excel Generation问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的ASP.Net应用程序中,我正在使用MsExcel Object Libby(Com-InterOp)生成一个Excel文件。该应用程序在VS开发人员中运行良好。环境。



但是,当我将其托管在服务器中时,如果没有用户通过远程桌面连接登录到服务器,则会出现以下错误。



由于以下错误,检索具有CLSID {00024500-0000-0000-C000-000000000046}的组件的COM类工厂失败:8000401a服务器进程无法由于配置的身份不正确而启动了。请检查用户名和密码。(HRESULT的异常:0x8000401A)。



我也已经设置了DCOM配置。奇怪的是,至少一个用户应该通过RDC连接到服务器。如果是这样,每个人都可以产生卓越。如果没有以上错误抛出。该应用程序的其余功能正常运行。



服务器是Windows Server 2008,IIS7。以及通过VPN连接应用程序的用户。



有人遇到这样的问题吗?



谢谢

解决方案

感谢@ Rofans.Net,根据他提供的观点,我们确定了服务器,托管的应用程序位于第三方数据中心,并且始终没有用户登录到服务器。只有登录的用户才是RDC用户。



因此,我们设法使用户以所有方式登录,并将计算机置于锁定状态,以便其具有所有方式登录的用户。



这是我们找到的唯一方法,如果有人找到更好的方法,请添加。



谢谢。 / p>

In my ASP.Net application I'm generating a Excel file using MsExcel Object Libby (Com-InterOp) . The application worked fine in the VS dev. environment.

But when I host it in the server I'm getting following error, if I'm no user is logged in to the server through Remote desktop Connection.

"Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a The server process could not be started because the configured identity is incorrect. Check the username and password. (Exception from HRESULT: 0x8000401A)."

I've set DCOM configurations as well. The strange thing is that at least one user should be connected to the server through RDC. If so everyone can generate excels. If not above error throws. Rest of the functionality of the application works fine.

The server is Windows Server 2008, IIS7. And the users connecting the application through a VPN.

Has any one experienced a issue like this?

Thanks in advance.

解决方案

Thanks for @Rofans.Net, based on the points provided by him we identified that the server, which the app was hosted was in a 3rd party data center and there is no user logged on to the server all the time. Only logged on users are the RDC users.

So we managed to have a user all ways logged in and and put the computer in the locked stated so that all ways it has a logged in user.

This is the only way we found and if anyone found a better way please add.

Thanks.

这篇关于托管时的ASP.Net Com-InterOp Excel Generation问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 20:43