# System.InvalidOperationException was unhandled when using LocalLBVirtualServer.get\_default\_pool\_name

**URL:** <https://community.f5.com/t/system-invalidoperationexception-was-unhandled-when-using-locallbvirtualserver-get-default-pool-name/61133>\
**Category:** Technical Forums\
**Tags:** icontrol, security, asm-advanced-waf, devops, c\
**Created:** [September 1, 2015, 11:52am UTC](https://community.f5.com/t/system-invalidoperationexception-was-unhandled-when-using-locallbvirtualserver-get-default-pool-name/61133 "2015-09-01T11:52:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kochav](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@Kochav](https://community.f5.com/u/Kochav)\
**Post date:** [September 1, 2015, 11:52am UTC](https://community.f5.com/t/system-invalidoperationexception-was-unhandled-when-using-locallbvirtualserver-get-default-pool-name/61133/1 "2015-09-01T11:52:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Joe\_Pruitt](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/joe_pruitt/32/8438_2.png) [@Joe\_Pruitt](https://community.f5.com/u/Joe_Pruitt)\
**Post date:** [September 3, 2015, 9:40pm UTC](https://community.f5.com/t/system-invalidoperationexception-was-unhandled-when-using-locallbvirtualserver-get-default-pool-name/61133/2 "2015-09-03T21:40:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Rob\_13365](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@Rob\_13365](https://community.f5.com/u/Rob_13365)\
**Post date:** [October 13, 2015, 4:26pm UTC](https://community.f5.com/t/system-invalidoperationexception-was-unhandled-when-using-locallbvirtualserver-get-default-pool-name/61133/3 "2015-10-13T16:26:40Z")

</div>

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](https://devcentral.f5.com/s/feed/0D51T00006i7br3SAA) thanks, Rob

---

<div class="post-metadata">

**Author:** ![Joe\_Pruitt](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/joe_pruitt/32/8438_2.png) [@Joe\_Pruitt](https://community.f5.com/u/Joe_Pruitt)\
**Post date:** [October 19, 2015, 5:58pm UTC](https://community.f5.com/t/system-invalidoperationexception-was-unhandled-when-using-locallbvirtualserver-get-default-pool-name/61133/4 "2015-10-19T17:58:11Z")

</div>

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