cat_13700
Mar 17, 2010Nimbostratus
C# 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!