The Windows default instalation comes with MSSQL client has a cliconfg application that is used to set aliases to Servers IP addresses and ports. Sometimes we use in our ConnectionStrings some of those aliases instead of IP address,port. How can I programatically translate that alias to an address using .NET?
Update: .NET + Windows automatically do this translation when we use the ConnectionString, but I don't know if the result of the translation (IP Address) is written in any public property where we can read it.
Update: I discovered that the cliconfg stores the aliases in the Windows Registry. I wonder if the Windows Registry is accessible from .NET
32bit HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo
64bit HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo