FÖRSÄLJNING: 1-800-867-1389
EN
Det här innehållet finns inte tillgängligt på ditt språk men här finns den engelska versionen,

Specifying Name Resolution Parameters in the Service Configuration File

Updated: December 4, 2014

You can specify a DNS server or servers when you create or edit a Service Configuration file. The DnsServers element is an optional element under the parent NetworkConfiguration element in the Service Configuration file. Settings in the Service Configuration file take precedence over settings contained in the Network Configuration file. When specifying these values, be aware that DnsServer name is used only as a descriptive identifier. The IP address must be a valid IPv4 address for the DNS server that you want to use.

For more information, see Azure Service Configuration Schema (.cscfg).

NetworkConfiguration element


      <DnsServers>
        <DnsServer name="ID1" IPAddress="IPAddress1" />
        <DnsServer name="ID2" IPAddress="IPAddress2" />
        <DnsServer name="ID3" IPAddress="IPAddress3" />
      </DnsServers>

To allow your role instances to be referenced by hostname, you must set the value for the hostname in the Service Configuration file for each role instance. Although vmName is optional in the Service Configuration file, if you do not include it, your role instances cannot be referred to by hostname in DNS.

The value that defines the hostname is vmName=“<vm-name>”. This value becomes the root of the hostname. The value is then translated into the hostname by appending the instance number to the vmName. For example, if the vmName is “MyApp”, vmName=“MyApp”, the hostnames would be “MyApp01”, “MyApp02”, “MyApp03” etc.

For more information about configuring an Azure service, see Azure Service Configuration Schema (.cscfg).

Hostname

    <Role name="<role-name>" vmName=“<vm-name>”>

See Also

Var detta till hjälp?
(1500 tecken kvar)
Tack för dina kommentarer
Visa:
© 2015 Microsoft