VMware {code} Community
jclit
Contributor
Contributor

Trouble connecting to ESX 3.5

I am attempting to use the VMware Infrastructure (VI) SDK with C# 2005 Simple Client and am not able to connect. The error I am getting is:

Caught Exception :

Name : WebException

Message : The request failed with HTTP status 400: Bad Request.

Trace : at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

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

at VimApi.VimService.RetrieveServiceContent(ManagedObjectReference _this)

at SimpleClient.SimpleClient.Connect(String url, String username, String password)

at SimpleClient.SimpleClient.Main(String[] args)

Any idea what I am doing wrong?

Tags (3)
0 Kudos
3 Replies
itm_nakul
Contributor
Contributor

have u set the environment variable clearly ??

please show what u have set ???

0 Kudos
jclit
Contributor
Contributor

I solved it. I was trying to connect to the IP only. It worked when i added a "/sdk" after the IP.

0 Kudos
carvalho2011101
Contributor
Contributor

Yes. I was with the same problem, but the /sdk solves it.

0 Kudos