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. General Programming
  3. COM
  4. Lost access to COM server from IIS JScript

Lost access to COM server from IIS JScript

Scheduled Pinned Locked Moved COM
comsysadminwindows-admindebugging
6 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.
  • D Offline
    D Offline
    darkbyte
    wrote on last edited by
    #1

    Hello, I'm wondering if anyone could have a hint that could put up the light on me. I've created a COM Service (COM Server & Service) and all works superbly. I access the objects on the COM service using IIS. I used to be able to debug my process as a Local Server instead of a Service by using the "-debug" command line option and that allowed me to see my coding mistakes. But i've come to a point where it works only as a Service and not as a Server. If i use VBA from MS-Excel, i can access my object but not from IIS JScript where i used to be able to before. Hmmmmm .. maybe if i completely unregister my proxy/stub DLL .. guess i'll try that tonite :D

    M 1 Reply Last reply
    0
    • D darkbyte

      Hello, I'm wondering if anyone could have a hint that could put up the light on me. I've created a COM Service (COM Server & Service) and all works superbly. I access the objects on the COM service using IIS. I used to be able to debug my process as a Local Server instead of a Service by using the "-debug" command line option and that allowed me to see my coding mistakes. But i've come to a point where it works only as a Service and not as a Server. If i use VBA from MS-Excel, i can access my object but not from IIS JScript where i used to be able to before. Hmmmmm .. maybe if i completely unregister my proxy/stub DLL .. guess i'll try that tonite :D

      M Offline
      M Offline
      Milton Karimbekallil
      wrote on last edited by
      #2

      I access the objects on the COM service using IIS hope u fixd it already.. i dont understand anything, what u mean by accessing it from IIS-JSscript.. rgds..mil10.

      D 1 Reply Last reply
      0
      • M Milton Karimbekallil

        I access the objects on the COM service using IIS hope u fixd it already.. i dont understand anything, what u mean by accessing it from IIS-JSscript.. rgds..mil10.

        D Offline
        D Offline
        darkbyte
        wrote on last edited by
        #3

        What i mean is that in IIS, if i have a server side script from which i try to instantiate my base object like: var obj = Server.CreateObject("my.progid"); this will fail if i start my object as a server but works if it is a service. Very weird actually. Haven't had a chance to work on it yet, but i'll keep you posted.

        M 1 Reply Last reply
        0
        • D darkbyte

          What i mean is that in IIS, if i have a server side script from which i try to instantiate my base object like: var obj = Server.CreateObject("my.progid"); this will fail if i start my object as a server but works if it is a service. Very weird actually. Haven't had a chance to work on it yet, but i'll keep you posted.

          M Offline
          M Offline
          Milton Karimbekallil
          wrote on last edited by
          #4

          Ok..ok DB, let me know how u come over that... Actually i havnt tried NT services using com exe. But a reasonable doubt is, if the com server is running as an nt service under local system account, how can u create objects of classes in that server. because our client programs are under the users account right?, and the Nt Service is under Local system account. rgds..mil10

          D 1 Reply Last reply
          0
          • M Milton Karimbekallil

            Ok..ok DB, let me know how u come over that... Actually i havnt tried NT services using com exe. But a reasonable doubt is, if the com server is running as an nt service under local system account, how can u create objects of classes in that server. because our client programs are under the users account right?, and the Nt Service is under Local system account. rgds..mil10

            D Offline
            D Offline
            darkbyte
            wrote on last edited by
            #5

            Heheh .. the answer is simple ::CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_NONE, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL); This is in my Service_Main code just after CoInitialize(NULL) Havent been successfull at making it work as a Local Server even after doing a full rebuild of: 1) COM Server (which is also my COM Service) 2) COM Stub/Proxy 3) IIS Filter It used to work fine and suddenly stopped working. But its probably a little something i bugged when i toyed my registering procedure to register my LocalService key under AppID. My COM Service is in pretty good shape now. I've learnt a great deal about COM and how to handle it. Eventually i might need to bring it forward as a DCOM application but its not a requirement yet :D I appreciate all the help i've been getting from you and any others that did help me find answers, even if it wasnt done directly, like when i browsed the great articles of CodeProject. I try to repay by helping others when i can.

            M 1 Reply Last reply
            0
            • D darkbyte

              Heheh .. the answer is simple ::CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_NONE, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL); This is in my Service_Main code just after CoInitialize(NULL) Havent been successfull at making it work as a Local Server even after doing a full rebuild of: 1) COM Server (which is also my COM Service) 2) COM Stub/Proxy 3) IIS Filter It used to work fine and suddenly stopped working. But its probably a little something i bugged when i toyed my registering procedure to register my LocalService key under AppID. My COM Service is in pretty good shape now. I've learnt a great deal about COM and how to handle it. Eventually i might need to bring it forward as a DCOM application but its not a requirement yet :D I appreciate all the help i've been getting from you and any others that did help me find answers, even if it wasnt done directly, like when i browsed the great articles of CodeProject. I try to repay by helping others when i can.

              M Offline
              M Offline
              Milton Karimbekallil
              wrote on last edited by
              #6

              Hi db ... Congrats... keep it up and learn more... I can understand ur raising confidence in COM programming day bi day.. keep it up... best wishes ... mil10.

              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