Solved

ATL Service : Error  0x80004015

Posted on 2001-07-29
9
1,543 Views
Last Modified: 2013-11-20
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.RegisterClassObjects(CLSCTX_LOCAL_SERVER | 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
0
Comment
Question by:devitalla
9 Comments
 

Author Comment

by:devitalla
ID: 6331121
I am not setting anything on DCOMCNFG. All default settings remain
0
 
LVL 12

Expert Comment

by:migel
ID: 6331292
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_(0x80004015L)
check your settings for atl.dll
0
 

Author Comment

by:devitalla
ID: 6331647
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?

0
 
LVL 9

Accepted Solution

by:
ShaunWilde earned 50 total points
ID: 6333268
what does your CoInitializeSecurity call look like ?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:devitalla
ID: 6339344
Coinitialize Security call ->  


hr = CoInitializeSecurity(NULL, -1, NULL, NULL,
        RPC_C_AUTHN_LEVEL_NONE, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);


0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6339973
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
0
 

Author Comment

by:devitalla
ID: 6354669
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\SOFTWARE\Classes\AppID\{1CE40564-40F3-4CC1-9D79-E8F5F0243FBC}
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?
0
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 6354913
> 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

0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9490577
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
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Is it possible to combine several text files into one big one? (redhat v5 enterprise) 4 81
move a line in eclipse 3 80
ShiftLeft challenge 21 76
Detect file exist or not 3 128
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now