System.InvalidOperationException was unhandled when using LocalLBVirtualServer.get_default_pool_name

Hi, I’m trying to use This snippet “C Polling Default Pool Connections” and the first half is working good until it gets to the this line “poolStats = m_interfaces.LocalLBPool.get_statistics(poolBatch);” then I get this exception :

System.InvalidOperationException was unhandled HResult=-2146233079 Message=There is an error in XML document (232, 79). Source=System.Xml StackTrace: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) 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 iControl.LocalLBPool.get_statistics(String[] pool_names) in c:\src\iControl\2005\iControl\iControl_9_4_0\Interfaces\LocalLB\LocalLBPool.cs:line 642

… etc

can someone help me solve this problem?

Typically errors like this are due to a new enumeration occuring in the BIG-IP version you are connecting to. What version of the PowerShell/iControl .Net lib are you using and which version of the BIG-IP are you connecting to?

Hey Kochav, I think I’m having a very similar problem - did you get this issue resolved? link to my issue:- DevCentral - An F5 Technical Community thanks, Rob

Try upgrading to the latest powershell snapin and see if that fixes things…