-
July 20th, 2013, 06:22 AM
#1
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.
Last edited by Lars_V_J; July 20th, 2013 at 08:08 AM.
-
July 22nd, 2013, 11:39 AM
#2
Re: Strange office automation errror pls help
Are you using Excel client components on the asp.net machine?
-
July 22nd, 2013, 11:51 AM
#3
Re: Strange office automation errror pls help
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
-
July 22nd, 2013, 12:28 PM
#4
Re: Strange office automation errror pls help
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.
-
July 22nd, 2013, 12:58 PM
#5
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...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|