DNS.UnbindDomainToIP
Skip to content
mnscript
StringResult DNS.UnbindDomainToIP(Secret, string) 

Description ​

Unbinds the terminals IP from the domain by removing an IP record matching the terminals IP. See https://portal.civilnetworks.net/maxnet/domains for more information

Arguments ​

Secret - Your secret domain key ( see https://portal.civilnetworks.net/maxnet/domains )
string - The domain URL. ( E.G mn.mydomain.com )

Returns ​

StringResult - A StringResult detailing the success or failure of the operation

Example ​

msc
using Console;
using System;
using Util;
using Secrets;
using DNS;

// Unbinds the current terminals IP from the domain
// You must obtain a domain key from the DNS service ( https://portal.civilnetworks.net/maxnet/domains )

Secret domainKeySecret = Secrets.GetSecret("my secret domain key");
string url = "mn.mydomain.com";

StringResult result = DNS.UnbindDomainToIP(domainKeySecret, url);

if (result.GetResult()) {
    Console.WriteLine("Domain unbinded!");
} else {
    Console.WriteLine("Error: "..result.GetString());
}