Re: DCOM :Access Denied error
- From: GR <GR@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Aug 2007 04:02:01 -0700
Hi Brian,
Thanks a lot for the reply. I am working on PCs with win XP (SP 2). With
RPC_C_AUTHN_LEVEL_CONNECT I am able to call methods of server.
Got some useful info from the link you provided.
Currently with RPC_C_AUTHN_LEVEL_CONNECT its working for same user logon.
Have to test for different logons.
With RPC_C_AUTHN_LEVEL_NONE it works when the machine dcom access limits is
edited and anonymous logon is given the remote access rights. I will not
prefer this approach as it would affect all the com components on the machine.
Thanks once again.
"Brian Muth" wrote:
I've tended to use RPC_C_AUTHN_LEVEL_CONNECT in preference to RPC_C_AUTHN_LEVEL_NONE, and I think you should give that a go if you.
haven't tried already. As long as both the client and the server are using a local user account with identical passwords, this
should work.
There are a few other things to check. If the server is Win2003, make sure the user is part of the Distributed COM Users group.
Remember that with later security packs to both Win2003 and WinXP, the system distinguishes between "Everyone" and "Anonymous".
"Everyone" still represents an authenticated user, whereas your settings are preventing any authentication at all. There is a fair
bit of work to get anonymous to work (including enabling the Guest account). If you go down this path, I suggest the following
review:
http://msdn2.microsoft.com/en-us/library/ms679714.aspx
HTH
Brian
"GR" <GR@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:383537FD-72FD-4DEE-B156-9B5AEFB6AEFF@xxxxxxxxxxxxxxxx
I am getting E_ACCESSDENIED error on calling methods of a dcom component.
The scenerio is as follows:
1> PC1 and PC2 are on LAN. The login on the both the PCs is same(same user
name and account). Both the PC can access each other(via ping or ip). So no
network issues.
2> Both client and server are using CoInitializeSecurity() as follows:
CoInitializeSecurity( NULL, //Points to security descriptor
-1, //Count of entries in asAuthSvc
NULL, //Array of names to register
NULL, //Reserved for future use
RPC_C_AUTHN_LEVEL_NONE, //The default authentication //level for proxies
RPC_C_IMP_LEVEL_IMPERSONATE, //The default impersonation //level for proxies
NULL, //Reserved; must be set to NULL
EOAC_NONE, //Additional client or //server-side capabilities
NULL //Reserved for future use
);
So as per this com should not be performing any authetication checks on
method calls. On both the pcs the machine launch and activation rights and
the acess rights have been given to "Everyone".
3> The CoCreateInstanceEx() call from client succeedes:
HRESULT _hr =
CoCreateInstanceEx(CLSID_SystemTreeIntf,NULL,CLSCTX_REMOTE_SERVER,&_info,1,&_result);
but further emthod calls on the retrieved interface returns Access Denied
error.
4> I have tried various permutation and combination with DcomCnfg settings
but in vain...:(.
Can someone please help.
Thanks a tons!!!!!!
- References:
- Re: DCOM :Access Denied error
- From: Brian Muth
- Re: DCOM :Access Denied error
- Prev by Date: Re: error MIDL2025 : syntax error : expecting { near ","
- Next by Date: Defining custom formula for Excel
- Previous by thread: Re: DCOM :Access Denied error
- Next by thread: Defining custom formula for Excel
- Index(es):
Relevant Pages
|