iControl SnapIn and version 11.6 - xml error?

Hello,

I write a script a year or so ago to get various statistics out of F5 BIG-IP and into our monitoring system. it was working fine on version 10.x but we recently upgraded to version 11.6 and now it’s broken and I can’t understand what’s wrong.

When I run the command:-

(Get-F5.iControl).LocalLBVirtualServer.get_statistics("someVIP")

I get the following exception:-

Exception calling "get_statistics" with "1" argument(s): "There is an error in XML document (358, 95)."
At line:1 char:1
+ (Get-F5.iControl).LocalLBVirtualServer.get_statistics("someVIP")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException

Can someone explain what’s going on with this error and how I might be able to resolve it?

Many thanks,

Rob

I found this question DevCentral - An F5 Technical Community Where Joe asks about the PowerShell/iControl .Net lib version. I don’t understand exactly what that is but the date on my C:\Program Files (x86)\F5 Networks\iControlSnapIn\iControl.dll is the 29/09/2011 and the properties of the file says it’s version 11.0.0.0. Hope someone can help! thanks again, Rob

I’ve worked out what was wrong. I was using an older version of the snapin.

I found the link to download iControlSnapInSetup_23.msi and now I’m back in business.

This issue comes up with you are connecting to a newer version of the BIG-IP where new enumerations were introduced. The way the SOAP layer works with the .net library is that it needs to know the string representations of the enums so when a new one comes down in a response the client code knows how to interpret it. Too bad the .net code doesn’t handle new values but that’s how it is.