How to Configure the MCS configuration to use Public DNS

Răspuns How to Configure the MCS configuration to use Public DNS

  • 19 ianuarie 2011 15:45
     
     

    We are using the MCS configuration on Microsoft Windows Server 2003 R2 (x86) in an application to configure services. Now, we want to configure it to use the public DNS rather than the default settings.

    Can somebody help me in that?

    • Editat de Anuj Agrawal 19 ianuarie 2011 15:47 Included OS
    •  

Toate mesajele

  • 20 ianuarie 2011 20:29
    Moderator
     
     

    What do you mean by the public DNS?  If you are IIS-hosted, you can configure business service endpoints and/or config service endpoints to use an IIS host-header, using configweb and IIS management tool to specify this, which might be an Internet-based domain name.  Can you provide more detail on what you want to achieve ?

     

    -Greg


    Greg Leake, Microsoft
  • 21 ianuarie 2011 07:31
     
     

    What do you mean by the public DNS?  If you are IIS-hosted, you can configure business service endpoints and/or config service endpoints to use an IIS host-header, using configweb and IIS management tool to specify this, which might be an Internet-based domain name.  Can you provide more detail on what you want to achieve ?

     

    -Greg


    Greg Leake, Microsoft

    Thanks Greg. Now let's me re state the problem.

     

    Actually, when we configured services using MCS Configuration, In SOA map it's showing us the machine names  as FQDN (fully qualified domain names).I want them to show their IP's there rather than the machine name.Can we achieve that while connecting the services by MCS configuration ?

  • 21 ianuarie 2011 20:48
    Moderator
     
     Răspuns

    Yes, this is easy, I put in a mechanism to do so.

    Look at the simple test harness, and specifically the Sample.SimpleTestHostWindowsConsole.exe sample included with STockTrader.  This works for any service implementing config service, and any host type, just using this as an example so you can try it out.

    In this way you can control, for each and every distinct service endpoint, whether you  use an IP address, or the default DNS qualified machine name.  Please note one clarifying point:

    There is a difference between having service use and show an IP address vs. locking down the service to be listening on just that IP address.  Most servers have more than one IP address.  You can have a service listen on all it's IP addresses but have Config Service only use and show a single IP address (vs. machine name) by following these instructions BUT not specifying in the binding hostNameComparisonMode="Exact". In other words, leaving your binding settings alone. 

    However, I am currently having an issue that requires further research when using the hostNameComparisonMode="Exact" in the binding.  So for now, you can accomplish what you want with the following, but without restrcting list of IPs the host is actually listening on.

    In the config file for the Sample.SimpleTestHostWindowsConsole.exe, under app settings, you will notice a commented section that looks like this:

    <

     

     

    appSettings>

    <

     

     

    add key="ConfigDAL" value="ConfigService.ServiceConfiguration.DALSQLServer"/>

    <!--

     

     

    This is an example of overriding listen URIs for two base addresses via config, to listen only on a specific IP/address network. Note the host binding must have hostNameComparisonMode="Exact" set as well.

    <add key="[domain-qualified-node-DNS-Name]==Simple Service Node Tcp" value="192.168.4.106"/>

    <add key="[domain-qualified-node-DNS-Name]==Simple Service Node Http" value="192.168.4.106"/>

     

     

     

    -->

    </

     

     

    appSettings>

    NOW, for this exe, in config add the following using your own list of IPs and host names.  Note you can specify as many machine names mapped to IPs as you want, so config files can be consistent across your hosts.  It only uses the specific IP when booting up on a host name that matches your entry.  In below example, I map ALL service endpoints to a specific IP (config, node and primary business endpoints).  But, you may only want to map specific service endpoints--up to you.  You can now in SOAMAP see IP address instead of DNS name, when saying Show Endpoint Detail.

    <!--This is an example of overriding listen URIs for two base addresses via config, to listen only on a specific IP/address network. Note the host binding must have hostNameComparisonMode="Exact" set as well.-->

    <

     

     

    add key="BigSur.DotNetDNS.com==Simple Service Node Tcp" value="192.168.4.15"/>

    <

     

     

    add key="BigSur.DotNetDNS.com==Simple Service Node Http" value="192.168.4.15"/>

    <

     

     

    add key="BigSur.DotNetDNS.com==Simple Service Config Http" value="192.168.4.15"/>

    <

     

     

    add key="BigSur.DotNetDNS.com==Simple Service Config Tcp" value="192.168.4.15"/>

    <

     

     

    add key="BigSur.DotNetDNS.com==Simple Service wsHttp" value="192.168.4.15"/>

    <

     

     

    add key="Anchorage.DotNetDNS.com==Simple Service Node Tcp" value="192.168.4.10"/>

    <

     

     

    add key="Anchorage.DotNetDNS.com==Simple Service Node Http" value="192.168.4.10"/>

    <

     

     

    add key="Anchorage.DotNetDNS.com==Simple Service Config Http" value="192.168.4.10"/>

    <

     

     

    add key="Anchorage.DotNetDNS.com==Simple Service Config Tcp" value="192.168.4.10"/>

    <

     

     

    add key="Anchorage.DotNetDNS.com==Simple Service wsHttp" value="192.168.4.10"/>

     

     

    -Greg

     


    Greg Leake, Microsoft
    • Marcat ca răspuns de Anuj Agrawal 8 februarie 2011 15:22
    •  
  • 24 ianuarie 2011 14:28
     
     Răspuns

    Thank Greg for your prompt reply.

     

    We have followed the steps provided by you and appended the IP address of the server in appsettings, restarted the services and in SOA map we are still getting the Machine name rather than the IP.

     

     

     

     

     

    -Anuj Agrawal

    • Marcat ca răspuns de Anuj Agrawal 8 februarie 2011 15:22
    •  
  • 24 ianuarie 2011 15:48
    Moderator
     
     

    Hi Anuj,

    This is tested/working for me.  Make sure your config section for these is not commented out, and using the below as a template make sure you have exactly specified your machine name (as it is now appearing in SOAMap before replacing values) and exactly specified the Service Friendly name(s) you want to override.  My provided example is specifically for the SimpleTestHost sample app that is part of the stocktrader sample.  Your service names will be different (and show up in the SOAMap).  So, for example:

    <add key="BigSur.DotNetDNS.com==Simple Service Config Tcp" value="192.168.4.15"/>

    Means my machine name is "BigSur.DotNetDNS.com".

    The service I want to override IP address for machine name is:  "Simple Service Config Tcp"

    Yours might looks like:

    <add key="Yourmachinename(fully qualified domain name)==Your Service Name" value="A Valid Server IP Address for this server"/>

    Can you attach your settings from config so I can see?

    Thx!

    -Greg

     


    Greg Leake, Microsoft
  • 8 februarie 2011 15:22
     
     

    Hi Greg,

     

    It's working now.

     

    Thanks for all your support.