VMware Cloud Community
mpr4ul
Contributor
Contributor

The remote server returned an error: (503) Server Unavailable.

Can anyone help on this...

While connecting to vCenter through Power CLI using C# code got the below error.

System.Net.WebException: The remote server returned an error: (503) Server Unavailable.

   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)

   at System.Net.HttpWebRequest.GetRequestStream()

   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

   at VimApi_60.VimService.RetrieveServiceContent(ManagedObjectReference _this)

   at VMware.Vim.ServiceInstance.RetrieveServiceContent()

   at VMware.Vim.VimClientImpl.Connect()

   at VMware.Client.VMwareClient..ctor(String ip, String username, String password)

Tags (2)
Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

Did you already look at the sample code in C# Sample Code by Task ?

And the vSphere SDK for .NET Developer’s Guide ?

Your development questions might have a better chance getting answered in one of the VMware Developer forums


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos