Forum Discussion
.NET add_cname method
I am trying to figure out how to add a cname record to zone runner via C. For some reason I keep getting an error. Here's what I have:
Interfaces interfaces = new Interfaces();
string[] view = { "external" };
ManagementViewZone[] viewZones = interfaces.ManagementZone.get_zone_name(view);
ManagementZoneInfo[] zoneInfo = interfaces.ManagementZone.get_zone(viewZones);
ManagementCNAMERecord record = new ManagementCNAMERecord();
record.cname = "test";
record.domain_name = "st.int";
record.ttl = 3600;
interfaces.ManagementResourceRecord.add_cname(viewZones, record);
From what I can gather this should work, but what it looks like the problem is has to do with the overloads for the add_cname method. Error below:
Error1The best overloaded method match for 'iControl.ManagementResourceRecord.add_cname(iControl.ManagementViewZone[], iControl.ManagementCNAMERecord[][])' has some invalid arguments
I get that the ViewZone would be an array, but it looks like it wants a a multi-dimensional array for the records? Reviewing this:
https://devcentral.f5.com/wiki/iControl.Create-CNAME-Resource-Record-in-Zone-Runner.ashx
It appears there should be some kind of sequence method, but only shows to be an alias in .NET. I'm confused... Any help would be greatly appreciated!
Thanks! Tony
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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