Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. loading COM object from aspx

loading COM object from aspx

Scheduled Pinned Locked Moved ASP.NET
helpcomwindows-adminquestion
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thebread
    wrote on last edited by
    #1

    hey folks, i just tryed to start iTunes from an aspx application by the browser. i get the following error: Die COM-Klassenfactory f?r die Komponente mit CLSID {DC0C2640-1415-4644-875C-6F4D769839BA} konnte aufgrund des folgenden Fehlers nicht abgerufen werden: 80070005. sorry, it's german but i think you'll get it. if i do exactly the same manually everything work fine. so i added a line for impersonation in my web.config to run my web as admin: <identity impersonate="true" userName="admin" password="topSecret"/> but i still get the same error. i'm afraid i have to configure some DCOM stuff but unfortuneltly i've no idea of DCOM. if someone is out there who has loaded a COM thing successfully in iis by aspx please help me !! thanks, bernd

    M 1 Reply Last reply
    0
    • T thebread

      hey folks, i just tryed to start iTunes from an aspx application by the browser. i get the following error: Die COM-Klassenfactory f?r die Komponente mit CLSID {DC0C2640-1415-4644-875C-6F4D769839BA} konnte aufgrund des folgenden Fehlers nicht abgerufen werden: 80070005. sorry, it's german but i think you'll get it. if i do exactly the same manually everything work fine. so i added a line for impersonation in my web.config to run my web as admin: <identity impersonate="true" userName="admin" password="topSecret"/> but i still get the same error. i'm afraid i have to configure some DCOM stuff but unfortuneltly i've no idea of DCOM. if someone is out there who has loaded a COM thing successfully in iis by aspx please help me !! thanks, bernd

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, Do you mean you want to load the COM object at the client side? If so, just make sure that it's properly installed and registered, then your application needs permission to active the object. The identity setting only has meaning at the server side, when your application wants to run under a specific account at the server side.

      T 1 Reply Last reply
      0
      • M minhpc_bk

        Hi there, Do you mean you want to load the COM object at the client side? If so, just make sure that it's properly installed and registered, then your application needs permission to active the object. The identity setting only has meaning at the server side, when your application wants to run under a specific account at the server side.

        T Offline
        T Offline
        thebread
        wrote on last edited by
        #3

        Right, i like to instanciate the COM object (in my case iTunes) at the server side. you may think that does not make sense, but it does. is there any security restriction to do stuff like that? regards, bernd -- modified at 2:51 Thursday 28th September, 2006 i just noticed the error after changing the inpersonation is 0x80080005. seems to be a CO_E_SERVER_EXEC_FAILURE error, isn't it? -- modified at 3:43 Thursday 28th September, 2006 in taskmanager i can see iTunes starts under the given user but no ui. i do not need the ui but if i start iTunes throu my code manually (not by iie) the ui will be shown. anyway, after one minute or so i get the 0x80080005 error.

        M 1 Reply Last reply
        0
        • T thebread

          Right, i like to instanciate the COM object (in my case iTunes) at the server side. you may think that does not make sense, but it does. is there any security restriction to do stuff like that? regards, bernd -- modified at 2:51 Thursday 28th September, 2006 i just noticed the error after changing the inpersonation is 0x80080005. seems to be a CO_E_SERVER_EXEC_FAILURE error, isn't it? -- modified at 3:43 Thursday 28th September, 2006 in taskmanager i can see iTunes starts under the given user but no ui. i do not need the ui but if i start iTunes throu my code manually (not by iie) the ui will be shown. anyway, after one minute or so i get the 0x80080005 error.

          M Offline
          M Offline
          minhpc_bk
          wrote on last edited by
          #4

          Actually, I thought that you might have wanted to create the COM object at the client side. Well, at the server side there are a couple of issues related to the security that you may need to take into account. Here are some for Office Automation, but it still can give you a couple of ideas. http://support.microsoft.com/kb/257757/[^] To check that, you can run the dcomcnfg.exe tool, then go to the Itunes application entry and check the security tab. Another option (normally works in the case of Automation) is that you can create a seperate account, then use this account to logon to install the ITunes application, and finally configure to run the ASP.NET application under this account.

          T 1 Reply Last reply
          0
          • M minhpc_bk

            Actually, I thought that you might have wanted to create the COM object at the client side. Well, at the server side there are a couple of issues related to the security that you may need to take into account. Here are some for Office Automation, but it still can give you a couple of ideas. http://support.microsoft.com/kb/257757/[^] To check that, you can run the dcomcnfg.exe tool, then go to the Itunes application entry and check the security tab. Another option (normally works in the case of Automation) is that you can create a seperate account, then use this account to logon to install the ITunes application, and finally configure to run the ASP.NET application under this account.

            T Offline
            T Offline
            thebread
            wrote on last edited by
            #5

            hey minhpc_bk, thanks for your advice. you may read one post before my iTunes.exe starts but it does not displays any UI. i set iis process to allow "communication between service and desktop" but that does not change anything. i checked out iTunes in dcomcnfg.exe and did the following steps: authentificationlevel: None launch and activation: <- added the executin user with maximum rights access: <- added the executin user with maximum rights configuration: <- added the executin user with maximum rights And now i get a timeout after one minute. I can see in taskmanager iTunesexe is loaded but not more. The memory usage does dot change...always 23.816MB or 23.820MB but it does not change. Also the CPU usage is zero. Maybe iis is now allowed to launch iTunes but iTunes is still not allowed to do anything..?? no idea...

            M 1 Reply Last reply
            0
            • T thebread

              hey minhpc_bk, thanks for your advice. you may read one post before my iTunes.exe starts but it does not displays any UI. i set iis process to allow "communication between service and desktop" but that does not change anything. i checked out iTunes in dcomcnfg.exe and did the following steps: authentificationlevel: None launch and activation: <- added the executin user with maximum rights access: <- added the executin user with maximum rights configuration: <- added the executin user with maximum rights And now i get a timeout after one minute. I can see in taskmanager iTunesexe is loaded but not more. The memory usage does dot change...always 23.816MB or 23.820MB but it does not change. Also the CPU usage is zero. Maybe iis is now allowed to launch iTunes but iTunes is still not allowed to do anything..?? no idea...

              M Offline
              M Offline
              minhpc_bk
              wrote on last edited by
              #6

              Can you validate in the Task Manager and see if the ITunes runs under the impersonated account or the ASPNET account? Here, you might want to spawn a new process at the server side and you can use the Process class. However, this class does not pass the impersonated token to the new process, and in this case you'll need to pinvoke CreateProcessAsUser function. For more information, you can see http://support.microsoft.com/default.aspx?scid=kb;EN-US;889251[^]

              T 1 Reply Last reply
              0
              • M minhpc_bk

                Can you validate in the Task Manager and see if the ITunes runs under the impersonated account or the ASPNET account? Here, you might want to spawn a new process at the server side and you can use the Process class. However, this class does not pass the impersonated token to the new process, and in this case you'll need to pinvoke CreateProcessAsUser function. For more information, you can see http://support.microsoft.com/default.aspx?scid=kb;EN-US;889251[^]

                T Offline
                T Offline
                thebread
                wrote on last edited by
                #7

                the process runs under the impersonated account. it does not matter if i start iTunes by System.Diagnostics.Process or by interop.iTunesLib. The behaviour is the same. -- modified at 17:43 Thursday 28th September, 2006 Current state: i tryed to start calc.exe with the same result. i can see the process in task manager but no UI.

                M 1 Reply Last reply
                0
                • T thebread

                  the process runs under the impersonated account. it does not matter if i start iTunes by System.Diagnostics.Process or by interop.iTunesLib. The behaviour is the same. -- modified at 17:43 Thursday 28th September, 2006 Current state: i tryed to start calc.exe with the same result. i can see the process in task manager but no UI.

                  M Offline
                  M Offline
                  minhpc_bk
                  wrote on last edited by
                  #8

                  It seems to me that setting the "Allow service to interact with desktop" option of the IIS does not help in this case, as it does not have any effect on the ASPNET process and you are spawning ITunes in this process. So IMO you may consider writing a window service which is responsible for creating a new Itunes process, and from the ASP.NET application you can use Remoting (or Web Service) to send the request to the window service to have it start the Itunes.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups