Strange office automation errror pls help
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Strange office automation errror pls help

  1. #1
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    448

    Question 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.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,296

    Re: Strange office automation errror pls help

    Are you using Excel client components on the asp.net machine?

  3. #3
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    448

    Re: Strange office automation errror pls help

    Quote Originally Posted by Arjay View Post
    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

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,296

    Re: Strange office automation errror pls help

    Quote Originally Posted by Lars_V_J View Post
    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.

  5. #5
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    448

    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center