Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
Switching Domain name depending on server?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Brennan Stehling, post: 1983342"] Brett, Why not use the hosts file? It is located here... C:\WINDOWS\system32\drivers\etc\hosts And it would look like this. 127.0.0.1 localhost 192.168.11.11 dbserver1 192.168.11.12 dbserver2 192.168.11.21 webserver1 192.168.11.22 webserver2 These hostnames point to IP addresses and you could place the same hosts file contents on each server. But you can also use the same set of names with different IP addresses. You Staging and Testing servers could point to Staging and Testing database servers and have the settings in your application simply refer to the hostname you place in the hosts file. When you move the identical application to your Production server the application will use the same names but connect to the alternate IP addresses. This is a good approach because the developers do not have to be concerned with changes on the servers and instead just code against a constant name. Alternatively you could change the values in the appSettings of your Web.config/App.config during deployment. If you are running many applications that means copying the deployment details to each application and updating each application when a server/network change is made. Brennan Stehling [URL]http://brennan.offwhite.net/blog/[/URL] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
Switching Domain name depending on server?
Top