larmib_53479
Mar 26, 2008Nimbostratus
iControl.LocalLBPoolMember.set_monitor_association
Can anyone tell me why I get the following error msg:
System.Net.WebException: The remote name could not be resolved: 'url_to_service'
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at iControl.LocalLBPoolMember.set_monitor_association(
String[] pool_names, LocalLBPoolMemberMemberMonitorAssociation[][] monitor_associations)
in D:\src\perforce\DevCentral\DC4\Labs\iControlAssembly\dotnet\iControl\Interfaces\LocalLB\LocalLBPoolMember.cs:line 461
Here's the code I'm using. The whole point to this big mess is to assign the member's of a Pool their own (yes I know it's the same one right now but it will be dynamic in the future) Health Monitor .
If LB_Interfaces.initialize(ip_address, username, password) = True Then
Dim pool_members As iControl.CommonIPPortDefinition()() = LB_Interfaces.LocalLBPool.get_member(pools)
Dim pool_member_def As iControl.LocalLBMonitorIPPort = New iControl.LocalLBMonitorIPPort
Dim monitor_rule As iControl.LocalLBMonitorRule = New iControl.LocalLBMonitorRule
Dim poolmember As iControl.LocalLBPoolMember = New iControl.LocalLBPoolMember
Dim pool_member As iControl.LocalLBPoolMemberMemberMonitorAssociation()() =
New iControl.LocalLBPoolMemberMemberMonitorAssociation(0)() {}
For j As Integer = 0 To pool_members.Length - 1
Dim pool_member2 As iControl.LocalLBPoolMemberMemberMonitorAssociation() = Nothing
ReDim pool_member2(pool_members(j).Length - 1)
For i As Integer = 0 To pool_members(j).Length - 1
pool_member_def.ipport = pool_members(j)(i)
monitor_rule.type = LocalLBMonitorRuleType.MONITOR_RULE_TYPE_SINGLE
monitor_rule.monitor_templates = New String() {"keepalivetemplate"}
pool_member2(i) = New iControl.LocalLBPoolMemberMemberMonitorAssociation()
pool_member2(i).member = pool_member_def
pool_member2(i).monitor_rule = monitor_rule
Next
pool_member(0) = pool_member2
poolmember.set_monitor_association(pools, pool_member)
Next
End If
One of the things I noticed but I'm not sure how the iControl Assembly works with this but if you use the wsdl.exe app to extract them the default for the function new is https://url_to_service like the below:
Public Sub New()
MyBase.New
Me.Url = "https://url_to_service"
End Sub