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