hi dukes,
i am running the application which uses WMI(acts as a WMI server) in VM. and i am trying to access this from the machine in another domain.
i have given the proper domain accounts,impersonate levels and other fields of WMI to connect remote machine.
in addition i am able to connect through the WMI tool (WBEMTEST)
when i am trying to connect through my code it is throwning this error
SetUp : System.UnauthorizedAccessException : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Server stack trace:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Management.ManagementScope.InitializeGuts(Object o)
at System.Management.ManagementScope.Initialize()
at System.Management.ManagementScope.Connect()
at Integration.Og.Client..ctor(String NamespacePath, String UserName, String Pwd, DateTime syncDailySchedule) in Client.cs: line 252
at Integration.Og.Ogclient.<>c__DisplayClass2.<getinstance>b__0() in Ogclient.cs: line 101
at System.Lazy`1.CreateValue()
Exception rethrown at [0]:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Management.ManagementScope.InitializeGuts(Object o)
at System.Management.ManagementScope.Initialize()
at System.Management.ManagementScope.Connect()
at Integration.OG.Ogclient..ctor(String NamespacePath, String UserName, String onGuardPwd, DateTime syncDailySchedule) in OnGuardClient.cs: line 252
at Integration.Og.Ogclient.<>c__DisplayClass2.<getinstance>b__0() in Ogclient.cs: line 101
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Integration.Og.Ogclient.GetInstance(String NamespacePath, String UserName, String Pwd, DateTime syncDailySchedule) in Ogclient.cs: line 112
at Integration.UnitTest.Og.OgclientTest.Init() in OgclientTest.cs: line 24
i have enabled the remote persmisions in the machine too.
kinldy help me out in over coming this.