I'm currently struggling with the same issue on TMOS 9.4.5 using the 9.6.0 and 10.0.0 iControl assemblies. Exact same exception regardless of using the pool or virtualserver method. If you don't catch the exception the method will return nothing and your app will hum along as if nothing went wrong.
Here is the code:
string[] sVSList = new string[] { cbVSList.SelectedItem.ToString() };
LocalLBPersistenceMode[] oLBPersistMode = new LocalLBPersistenceMode[] { LocalLBPersistenceMode.PERSISTENCE_MODE_NONE };
// PERSISTENCE_MODE_NONE will cause it to return all types.
LocalLBPersistenceRecord[][] PulledPersistTable = new LocalLBPersistenceRecord[][] { };
try
{
PulledPersistTable = if_iControl.LocalLBVirtualServer.get_persistence_record(sVSList, oLBPersistMode);
//PulledPersistTable = if_iControl.LocalLBPool.get_persistence_record(sVSList, oLBPersistMode);
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
And attached is the offending HTTP return captured via Fiddler2. Please let me know if there is any other information I can provide.