Troubleshooting the Setup
If you cannot successfully run the SimpleClient, first check your environment settings and all other setup tasks.
Proxy Server Connection Problem
You might have a proxy connection problem.
Problem
The sample application reports that it is unable to connect to the remote server. For example:
SimpleClient.exe https://<management-server>/sdk <user> <pass>
Caught Exception : Name : WebException Message : Unable to connect to the remote server
Trace : at System.Net.HttpWebRequest.GetRequestStream() at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at VimApi.VimService.RetrieveServiceContent(ManagedObjectReference _this) ...
Exception disconnecting.
Caught Exception : Name : NullReferenceException Message : Object reference not set to an instance of an object.
Trace: ...
Cause
Cannot connect to the Web service from Microsoft .NET client sample through the proxy server.
Solution
Try a different server on the same subnet as the client.
sgen Configuration Issues
The sgen tool used to generate XML serializer assemblies might be configured incorrectly.
Problem
The sgen tool gives unexpected results.
Cause
The behavior of the sgen tool varies depending on what you have in your Machine.config file. For example, by default sgen is supposed to output optimized non-debug code, but that is not always the case.
Solution
Adjust your sgen configuration. To get more debugging information, use the /k flag, which causes sgen to keep all its temporary generated files, including the source files and command-line option files