C# – ASP.Net Com-InterOp Excel Generation issue when hosting

asp.netccom-interopwindows-server-2008

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.

Best Answer

In the end I created user who is admin on the computer with the web service, and then I set this user like shown on the screen below:

enter image description here

That worked. And we didn't have to let the computer be locked.

Related Topic