Varad, The .NET Guy!

Exploring the excitement of Microsoft .NET and much more..

February 2006 - Posts

Help: How to Configure Web Services URL?

We are developing an Intranet Web Application that consumes about 7 to 8 internal web services [.NET and J2EE] for different transactions. We host the web services and our application in different environments viz DEV, Test, UAT etc.

The web references for these web services are set to Dynamic and Web Services URL is dynamically taken from the Web.config file. Now we want to have a standard web.config file in order to keep our deployment to any of the environment the same. When we are in DEV environment we need to access the Web Services that were hosted in DEV and vice versa for other environments. The problem now is we cannot have a common Web.config file that has the URL for the web services, that is being used by our web reference. Because when we move the code from DEV to Test to UAT etc, we need to make changes to web.config file. The pain is there are 4 to 5 servers involved in Test and UAT environments and we have to manually edit the web.config file in all the servers to point to specific web services URL.  If the web application and web services are hosted on the same servers, Is there any way to dynamically configure the URL for web services in web.config?

For e.g,

In Test environment we have 5 servers (test01.myserver.net, test02.myserver.net, test03.myserver.net, etc) both the web application and web services are hosted on the same servers. The web application in test01.myserver.net has to access the web service hosted in test01.myserver.net and vice versa for other servers. In this case I need to manually edit the web.config in all the 5 servers and change the Web Services URL of the 7 services to point the respective URL.

We are not allowed to keep the web services in a single server, In test environment both the web application and web services has to exist in the same server. But these servers are load balanced.

Is there any way to dynamically configure the web.config file? Like using host files or environment variable..

It would be great if anyone throw me some light to resolve this.

Thanks!

 

 

Posted: Feb 26 2006, 02:02 PM by Varad | with 6 comment(s)
Filed under:
Three new generation Microsoft Certification Exams Release!

Time has come to prepare and conquer the new certifications from Microsoft Learning. Yes, the first three new generation Certifications are out

Exam 70-528: TS: Microsoft .NET Framework 2.0 - Web-based Client Development 
Exam 70-431: TS: Microsoft SQL Server 2005 - Implementation and Maintenance 
Exam 70-441: PRO: Designing Database Solutions by Using Microsoft SQL Server 2005 

All the very BEST :)

 

Posted: Feb 20 2006, 02:03 PM by Varad | with no comments
Filed under:
More Posts