devitalla
asked on
ATL Service : Error 0x80004015
Hi,
I need help regarding the error 0x80004015
I built an ATL service with a component.
The interface exposed has a test method.
I registered the proxy stub dll.
When I debug my ATL service, in the Run() method ,
The first call to CoInitialize() and the next call to CoInitializeSEcurity(...) succeed. After that,
I get the hr value= 0x80004015 when I call the RegisterClassObjects.
hr = _Module.RegisterClassObjec ts(CLSCTX_ LOCAL_SERV ER | CLSCTX_REMOTE_SERVER, REGCLS_MULTIPLEUSE);
_ASSERTE(SUCCEEDED(hr));
I tried on windows NT 4.0 and also windows 2000. The same error is encountered.
What can be the reason. How do I avoid this.
I need help
I need help regarding the error 0x80004015
I built an ATL service with a component.
The interface exposed has a test method.
I registered the proxy stub dll.
When I debug my ATL service, in the Run() method ,
The first call to CoInitialize() and the next call to CoInitializeSEcurity(...) succeed. After that,
I get the hr value= 0x80004015 when I call the RegisterClassObjects.
hr = _Module.RegisterClassObjec
_ASSERTE(SUCCEEDED(hr));
I tried on windows NT 4.0 and also windows 2000. The same error is encountered.
What can be the reason. How do I avoid this.
I need help
Hi!
this message tells you about wrong securitu settings:
//
// MessageId: CO_E_WRONG_SERVER_IDENTITY
//
// MessageText:
//
// The class is configured to run as a security id different from the caller
//
#define CO_E_WRONG_SERVER_IDENTITY _HRESULT_TYPEDEF_(0x800040 15L)
check your settings for atl.dll
this message tells you about wrong securitu settings:
//
// MessageId: CO_E_WRONG_SERVER_IDENTITY
//
// MessageText:
//
// The class is configured to run as a security id different from the caller
//
#define CO_E_WRONG_SERVER_IDENTITY
check your settings for atl.dll
ASKER
Where do I check my settings..
My service settings in Registry is Local Service and
ServiceParameters= - Service.
How do I avoid this. What security settings I have to change?
My service settings in Registry is Local Service and
ServiceParameters= - Service.
How do I avoid this. What security settings I have to change?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Coinitialize Security call ->
hr = CoInitializeSecurity(NULL, -1, NULL, NULL,
RPC_C_AUTHN_LEVEL_NONE, RPC_C_IMP_LEVEL_IMPERSONAT E, NULL, EOAC_NONE, NULL);
hr = CoInitializeSecurity(NULL,
RPC_C_AUTHN_LEVEL_NONE, RPC_C_IMP_LEVEL_IMPERSONAT
and what do you use on the client ?
if you set them both to the same - it helps -
by the way according to the docs if you use CoInitializeSecurity then registry entries are ignored
if you set them both to the same - it helps -
by the way according to the docs if you use CoInitializeSecurity then registry entries are ignored
ASKER
I use the same settings on the Client too.
Still I get the same error.
If the Client and Server are running on the same system,
to avoid the error, I need to edit the Registry entries
HKEY_LOCAL_MACHINE\SOFTWAR E\Classes\ AppID\{1CE 40564-40F3 -4CC1-9D79 -E8F5F0243 FBC}
and remove the "LocalService" = <servicename> string value.
Is this a correct way to solve the problem.
Is there any other way to avoid this problem?
Still I get the same error.
If the Client and Server are running on the same system,
to avoid the error, I need to edit the Registry entries
HKEY_LOCAL_MACHINE\SOFTWAR
and remove the "LocalService" = <servicename> string value.
Is this a correct way to solve the problem.
Is there any other way to avoid this problem?
> Is this a correct way to solve the problem
yes it is (according to what I have just red) - well spotted - see KB article Q158508 (Q6)
to stop the LocalService from re-appearing you can edit the .rgs file and rename it to _LocalService - that way it is easy to put back if necessary
yes it is (according to what I have just red) - well spotted - see KB article Q158508 (Q6)
to stop the LocalService from re-appearing you can edit the .rgs file and rename it to _LocalService - that way it is easy to put back if necessary
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by : ShaunWilde
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Roshan Davis
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by : ShaunWilde
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Roshan Davis
EE Cleanup Volunteer
ASKER