Strange office automation errror pls help
I have a asp.net website (written in C#) where the user can click on the website and have MS Office 2013 autogenerate Excel spreadsheets.
And now we come to the weird error:
I get this error:
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).
Unless someone has an (open!!!) RDP connection to the webserver. If I close the RDP, the error is received, even when the user running the App Pool is still logged in. When I re-open the RDP, the error disappears (until the RDP is closed again, that is).
So: It appears, that one has to have an active screen (RDP or a "real" screen) for MS Office automation to work.
My question is this: how do I get around this problem???
Edit: I found out, that if I let a user (the one running the app pool) log in at boot, and then NEVER use RDP (but instead VNC), it works. Because then there is an Interactive User (and there can be only one of those).
It sucks - of course it should be possible to NOT have an interactive user and all that crap. But this is the least bad solution I found. If one of you have one that's better, I'm all ears.
Re: Strange office automation errror pls help
Are you using Excel client components on the asp.net machine?
Re: Strange office automation errror pls help
Quote:
Originally Posted by
Arjay
Are you using Excel client components on the asp.net machine?
I'm using the MS office COM object like they do here: http://csharp.net-informations.com/e...l-tutorial.htm
And yes, I'm doing it in ASP.NET.
I've seen, that MS don't support doing that kind of thing (which I think is silly), but that's what I have to do in my program.
But I was hoping to get around the need for all this "the interactive user needs to look at the machine work" crap, because I think it kind of defies the purpose of Office Automation
Re: Strange office automation errror pls help
Quote:
Originally Posted by
Lars_V_J
I've seen, that MS don't support doing that kind of thing (which I think is silly), but that's what I have to do in my program.
Yeah, MS doesn't support using client side components on a server. If you want to do things in a supported fashion, check out Excel Sharepoint Services.
Re: Strange office automation errror pls help
Hm...Sharepoint eh?
Is that really the only way. I mean sharepoint is a huge and expensive beast...