WMI programming is not working in Pivotal Cloud Foundry(PCF)


Unable to connect to remote server using .NET WMI after deploying the code in Pivotal Cloud Foundry(PCF). Below is the code snippet:

ConnectionOptions conOptions = new ConnectionOptions();
                    conOptions.Username = "XXXXXXX";
                    conOptions.Password = "XXXXXXX";
                    conOptions.Authority = "XXXXXXX";
                    ManagementScope ms = new System.Management.ManagementScope(@"\\" + server + @"\root\cimv2", conOptions);

I'm receiving the following error:

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Could you please let me know how to establish this connectivity from Pivotal Cloud Foundry(PCF)

Below are the deployment details:

Buildpack: dicf_hwc_buildpack_latest Start Command: .cloudfoundry\hwc.exe

Stack: windows2012R2 (Microsoft Windows / .Net 64 bit)

Health check type: port

asked on Stack Overflow Aug 1, 2018 by Srini

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0