Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Fri, 4 Jul 2008 13:32:19 +0200,    group: microsoft.public.win32.programmer.ole        back       


DCOM authentication and security   
Hello,

I have to access a DCOM server at a Windows CE 5 device. The device has
enabled remote access for DCOM. The client is a Windows XP system. I would 
like to
ignore all the authentication/authorization stuff. But my experiments did
not gave any success.

Here is the code I use without success:

CLSID clsid = { my_class_id };
IClassFactory*pClassFactory;
IUnknown*pUnknown;
COSERVERINFO ServerInfo = { 0 };

CoInitializeEx(NULL, COINIT_MULTITHREADED);
ServerInfo.pwszName = L"129.168.1.1";
CoGetClassObject(clsid, CLSCTX_SERVER, &ServerInfo, IID_IClassFactory,
(void**)&pClassFactory);
// these two next lines fail
pClassFactory->CreateInstance(NULL, IID_MyInterface, (void**)&pUnknown);
pClassFactory->Release();
CoUninitialize();

All functions succeed, except the calls to any IClassFactory method. The 
return value is always 0x80070005.
I monitored the network traffic with WireShark and could see traffic while 
calling CoGetClassObject but only a connection reset at the first call to a 
IClassFactory method.

How can I establish a working connection? What should I read? I have 
administrative rights to server and client side. Can I configure the system 
to allow the access? Is there a way to programmatically set all the 
authentication information?

Regards,
Helge


-- 
Time is an ocean but it ends at the shore.
date: Fri, 4 Jul 2008 13:32:19 +0200   author:   Helge Kruse

Re: DCOM authentication and security   
I'm not familiar with WinCE, so I'm afraid some of my statements/questions may not make much sense, but hopefully this will be a 
guide for you.

DCOM security is a negotiation between the client and the server. The client sets the high water mark and the server sets the low 
water mark. What this means is the client says "I will let you know this much about me", and the server says "I need to know these 
things about you before you are granted access".

If you are only interested in anonymous access, then the issue is going to be primarily on the server side, that is setting the 
lower water mark to "anonymous access".

So, on the server side, what are the security settings of the DCOM server? Using DCOMCNFG.exe, be sure to review your launch and 
access settings.

Does your DCOM server code call CoInitializeSecurity()? Note this will override any of your DCOMCNFG settings, so you need to set 
the parameters accordingly.

Brian
date: Fri, 4 Jul 2008 09:47:18 -0700   author:   Brian Muth

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us