Reputation: 1
I am working on Remote WMI. I have done all DCOM settings, CIMV2 and WMI settings for particular User. When I run the application as console app, it works fine and fetches me the data. But when I host the same as Windows service, it is throwing exception as
Message: Error Message: Access is denied.
(Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Inner Exception Message: 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 RemoteWMIRule.BackupServerRule..ctor()
Upvotes: 0
Views: 376
Reputation: 1
Got Solved by adding Network and Network Service in DCOM Configurations. But still the problem persists in Windows Server 2008 R2 OS. Anything OS specific to be done???!!
Upvotes: 0