Forum Discussion
cat_13700
Nimbostratus
Mar 17, 2010C# set_active_partition error
I have big plans for the dashboard I will write to display a constantly refreshing panel of all the member of all my pools. I thought I'd better start by getting the iControlApp (from the video) tutorial working first. I run it, it connects, and it diplays one common pool, which I don't need. I want the "Alpha" partition pools. Scanning the forums, I learned I need to get my permissions and then set the active partition. At this point, the train wrecks.
Here's what I did:
First I added web references to Management.UserManagement and Management.Partition. Then up at the top of Form 1 of the demo app, i added these variables after the m_pool and m_poolMember variables:
private ManagementUser.ManagementUserManagement m_manUser = new ManagementUser.ManagementUserManagement();
private ManagementPartition.ManagementPartition m_manPart = new ManagementPartition.ManagementPartition();
So far so good. Then down in Refresh_Pools function, I added the following just after "cb_pools.Items.Clear();" line:
m_manUser.get_my_permission();
m_manPart.set_active_partition("Alpha");
I got a clean compile, but it breaks on either line (if i comment one or the other out) with an error: "The remote name could not be resolved: 'url_to_service'".
What am I missing? Code snippets or examples greatly appreciated!
- If you are importing the WSDL files directly into Visual Studio, then you have to do some fun and games with the default URL that is specified. We make the URL in the WSDL files "http://url_to_service/iControl/iControlPortal.cgi" since we don't know (specifically in the standalone SDK) what the address of your BIG-IP is.
iControl.Interfaces m_interfaces = new iControl.Interfaces(); bool bInitialized = m_interfaces.initialize("10.10.10.10", "admin_user", "admin_pass"); if ( bInitialized ) { m_interfaces.ManagementUserManagement.get_my_permission(); m_interfaces.ManagementPartition.set_active_partition("Alpha"); }
- cat_13700
Nimbostratus
worked like a dream. Perfect! - Great to hear. Stick with the .net assembly and you'll be a happy camper!
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects