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:
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