I have a WPFApplication coded in c# that access a COM component. My machine(client) and the COM Server machine have Windows 7 OS. And both on same domain. I tried to create an instance of the com component with below code and it gave me no error
string clsId = "85689616-277B-4E00-9A5E-19AD78E7E0E2";
var type = Type.GetTypeFromCLSID(new Guid(clsId), MachineName, true);
var COMObject = Activator.CreateInstance(type);
test = (IPDSIntf)COMObject;
Now when I call any method in the COM. say test.Connect(clientId, errorCode)
, I am getting exception 'Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))'.
Have set many permission, gave admin privilege to my user account on the server machine, added mu account to 'Distributed COM Users' group etc... But still getting same issue.
If I have the COM component also locally, i.e. , client and server in same machine, I get no such error.
I am running out of time to fix it and have already spent 3 days on the same, googling. But no luck.
One more thing, is I could not see my COM in DCOMCNFG, means it is not registered? What could be the reason for it. I believe all COM component in machine will be registered in component services. Need some clarification on this too as I doubt it has some relation with my issue.
Thanks In advance,