1 Reply Latest reply: Dec 18, 2012 3:05 PM by f f RSS

    CO_E_SERVER_EXEC_FAILURE when using the automation interface from an ASP.NET application.

      I am simply trying to open a .qvw document, save it and close it again from .NET using the automation interface. (When I do this, first the -prj folder is created, so the documentlayout xml files are automatically generated).

       

      Anyway, this should be as simple as this code:

       

            var qvApp = new QlikView.Application();

            var qvDoc = qvApp.OpenDoc(documentFromDb.FullPath);

            qvDoc.Save();

       

      And this code actually works when executed from a simple console application.

       

      When I execute this in a server context (ASP.NET), I always get an error:

       

      Retrieving the COM class factory for component with CLSID {0E4678AA-415E-11D1-934D-0040333C91CC} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).

       

      This happens on the first line.

       

      I have tried running the web server under different user accounts, even the local administrator account, to no avail. I have tried changing the rights in dcomcnfg, until the point that basically "everyone" had rights to do "everything"... still no change.

       

      Is there uberhaupt *any* way to automate Qlikview *without* using the user interface (as I suppose that's the reason of the problem here, or at least it has something to do with it).

       

      I really need the files under the -prj folder, and I need them unattended, and I need them from an ASP.NET application.

       

      Any suggestions?

        • Re: CO_E_SERVER_EXEC_FAILURE when using the automation interface from an ASP.NET application.

          *Sigh* I found a solution...

           

          It *was* security after all :-s

           

          I had to explicitly set a user (choose for "This user") on the "Identity" tab in dcomcnfg.

          I'm not sure why though, as before, it was set on "the launching user", and I did configure the apppool of the web app with the same user, and that didn't work.

          I'm sure that user actually tried to launch qv.exe, as I saw it in process explorer.

           

          Hmmm...

           

          So still looking for an good explanation though...

           

          Why does it work with an explicitly set user and not with "The launching user" while the launching user is the same as the explicitly set one?