dayra01
Contributor
Contributor

System.Exception: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it

Hi,

I'm trying to create the VM using

CreateVM_Task() API. After calling this API, when am trying to

WaitForTaskValues(), i am getting an exception

"System.Exception: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it ".

Can someone help me what does this exception mean and how to go about it? How can i avoid gettnig this exception?

Thanks,

-Raghu.

0 Kudos
2 Replies
Steve_Jin
Expert
Expert

WaitForTaskValues() -- I cannot find this method in VI SDK. Are you using some library?

Steve JIN, VMware Engineering

Creator of VMware Infrastructure Java API. VI Java API 2.0 --- 15 times faster than AXIS in loading, 4+ faster in deserialization; only 1/4 of the size required by AXIS. More importantly, the freedom to redistribute your applications. (Download, Samples, DocWiki, RSS Feed)

Get Connected with Other Developers in the Community?

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
0 Kudos
admin
Immortal
Immortal

At which state you received this error? Were you able to create a Virtual Machine successfully, did you see a newly created Virtual machine in your inventory using VI Client? Incase yes, did you in your code called Logout APi to disconnect the session created? Incase no, please share the code snippet of your WaitForTaskValues(). This information would help us debug the error seen by you.

0 Kudos