-
how to update Web Reference using NAnt?
Dear all,
I have inherited a web app project that makes use of a number of WCF Web Services hosted on a remote server. We have two environments that I need to deploy this project to, with different URLs for the different remote servers.
i.e. In the Staging environment, I need to point the services at xx.xx.xx.101
In the Live environment, I need to point them at xx.xx.xx.102, or whatever.
Currently, we've got all of the URLs stored in keys in the web.config file, so that we can change them dynamically... Unfortunately this isn't working!
If I change the URL in the web.config to something other than what the project was compiled with, I get an error when calling the web service:
Server did not recognize the value of HTTP Header SOAPAction: xx.xx.xx.101\ServiceName\MethodName.
During the .NET conversion process from 1.1 to 3.5, there is a Auto Generated web reference source file (Reference.cs under web reference) that contained the logic to get the correct Production URL for configuration file (web.config).
The problem is this logic seem to be replaced with a manual hard code referencing test webservice URL. Regarding how this happened still seems to be a puzzle which is hard to find as this file was supposed to be auto-generated and no manual edits should have taken place. This was not encountered in TEST environment as the unit test scenarios covered Common test accts.
It's driving me mad! I've written a pre-build NAnt script to go through and replace all instances of the URL found anywhere in the project directory, and even that isn't making any difference.
There must be something else being pulled down from the service when I click the "update reference", but I'm new to working with web services, and so I'm not sure what.
Does anyone have any ideas? Is there a way to do this programatically?
Similar Threads
-
By sunilbenjamin in forum ASP.NET
Replies: 0
Last Post: 09-25-2008, 11:56 PM
-
Replies: 0
Last Post: 10-04-2006, 07:06 PM
-
By JFeng in forum ASP.NET
Replies: 1
Last Post: 04-14-2006, 03:08 PM
-
By stsong in forum ASP.NET
Replies: 0
Last Post: 05-23-2003, 01:48 PM
-
By CodeMage in forum Architecture and Design
Replies: 0
Last Post: 09-24-2002, 07:26 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks