Reputation: 31
I'm trying to understand why I get stackoverflow exception on one project (Web Service) but not on WinForm project..
Here is the code:
VimClient vimClient = new VimClient();
ServiceContent serviceContent = vimClient.Connect("https://servername/sdk");
UserSession us = vimClient.Login(username, password);
ManagedObjectReference _svcRef = new ManagedObjectReference();
_svcRef.Type = "ServiceInstance";
_svcRef.Value = "ServiceInstance";
NameValueCollection filterForVM = new NameValueCollection();
filterForVM.Add("Name", ServerName);
VirtualMachine vm = (VirtualMachine)vimClient.FindEntityView(typeof(VirtualMachine), null, filterForVM, null);
vimClient.Disconnect();
The Exception is on this line:
VirtualMachine vm = (VirtualMachine)vimClient.FindEntityView(typeof(VirtualMachine), null, filterForVM, null);
What could it be?
Upvotes: 2
Views: 104
Reputation: 31
Creating new thread with new stack size solved the problem :) thanks
Upvotes: 1