VMware {code} Community
Xaosthetic
Contributor
Contributor

Cannot connect with C# sampes for SDK 5.5 to vSphere (SSL\TSL error )

Hello Guys,

I'm trying to execute SimpleClient or RealTime program but I get bunch of exeptions. For example when I run SimpleClient with this command:

SimpleClient --url Https://192.168.xxx.xxx/sdk --username administrator@vsphere.local --password somepassword --disablesso

I get following  exceptions:

[ 2014-09-11 20:17:09 ] Begin Log.

Started

Caught Exception :  Name : WebException Message : Połączenie podstawowe zostało zakończone: Nie można ustanowić relacji

zaufania dla bezpiecznego kanału SSL/TLS. Trace :    w System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(We

bRequest request)

   w System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)

   w Microsoft.Web.Services3.WebServicesClientProtocol.GetResponse(WebRequest request, IAsyncResult result)

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

   w Vim25Api.VimService.RetrieveServiceContent(ManagedObjectReference _this)

   w AppUtil.SvcConnection.Connect(String url, String username, String password) w c:\WS\SDK\vsphere-ws\dotnet\cs\sample

s\AppUtil\SvcConnection.cs:wiersz 88

   w AppUtil.ServiceUtil.ClientConnectDeprecated() w c:\WS\SDK\vsphere-ws\dotnet\cs\samples\AppUtil\ServiceUtil.cs:wiers

z 95

Exception running : SimpleClient

Caught Exception :  Name : WebException Message : Połączenie podstawowe zostało zakończone: Nie można ustanowić relacji

zaufania dla bezpiecznego kanału SSL/TLS. Trace :    w AppUtil.ServiceUtil.ClientConnectDeprecated() w c:\WS\SDK\vsphere

-ws\dotnet\cs\samples\AppUtil\ServiceUtil.cs:wiersz 107

   w AppUtil.ServiceUtil.ClientConnect() w c:\WS\SDK\vsphere-ws\dotnet\cs\samples\AppUtil\ServiceUtil.cs:wiersz 37

   w AppUtil.AppUtil.connect() w c:\WS\SDK\vsphere-ws\dotnet\cs\samples\AppUtil\AppUtil.cs:wiersz 656

[ 2014-09-11 20:17:14 ] End Log.

Caught Exception :  Name : WebException Message : Połączenie podstawowe zostało zakończone: Nie można ustanowić relacji

zaufania dla bezpiecznego kanału SSL/TLS. Trace :    w AppUtil.AppUtil.connect() w c:\WS\SDK\vsphere-ws\dotnet\cs\sample

s\AppUtil\AppUtil.cs:wiersz 665

   w SimpleClient.SimpleClient.Main(String[] args) w c:\WS\SDK\vsphere-ws\dotnet\cs\samples\SimpleClient\SimpleClient.cs

:wiersz 209

I've also tried to login with ssourl but still no effect, however stack trace is different.

I've got Polish language pack for my visual studio. Please let me know if something is not clear and I have to translate something or provide more information

regards,

Xaosthetic

0 Kudos
1 Reply
Xaosthetic
Contributor
Contributor

Hello once again.

If you guys feel that I didn't go deep enough to understand that problem and you won't answer such a simple question just please let me know where can I find this knowledge. I'm still struggling with this issue... I've tried most of samples with multiple login parameters - still no effect. What is strange I am able to run code I've downloaded some time ago, which says if VM is powered on or not, but it's not from official SDK bundle. If that will be helpful I'll attach file with this code.

0 Kudos