473,386 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Dynamic URL for WebService in VS2008

bkreitman
All,

I am trying to create a new Web Service in VS2008. When I add a "Service Reference" in the IDE, it asks for a static URL for the webservices, which I provide and everything works well. The URL is written into the .disco and .wsdl file on the solution.

However, I have my setup with a DEV, a QA , and PROD environments so that it can be throughly tested in Development and at Quality Assurance and finally installed onto the PROduction system. Each of these environments have a different URL for the IIS server where the webservices are installed.

How can I use the same code and have the referenced Web Service point to any of the three servers depending on its environment?

Even changing an ini/app.config file is OK, I just don't know how to do it, and tell the service to use the new URL. I have written a C# console app, that would like to reference and use a Vb.net webservice on out central server.
Oct 7 '08 #1
4 2443
Plater
7,872 Expert 4TB
Could you change the hosts file on the testing computer?
So when it goes to find somePRODurl.com it really goes to someQAurl.com ?
Oct 7 '08 #2
Curtis Rutland
3,256 Expert 2GB
You can right-click the reference in the Service References folder, and click "Configure Service Reference." You can put the new address there.
Oct 7 '08 #3
I can change the URL for each environment, but it would require a re-compile for each environment, and I am trying to use a single code base. Ultimately, I only really care about the PROD environment, but in order to test correctly, I need have the same code at each step of the way.
Oct 7 '08 #4
You can right-click the reference in the Service References folder, and click "Configure Service Reference." You can put the new address there.

I can change the URL for each environment, but it would require a re-compile for each environment, and I am trying to use a single code base. Ultimately, I only really care about the PROD environment, but in order to test correctly, I need have the same code at each step of the way.
Oct 7 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Ron | last post by:
I have a bunch of Crystal Reports (v9) published as WebServices and use a ReportViewer to display the reports on the ASPNET page. Everytime we move the reports from dev to production we have to...
5
by: Wayne | last post by:
I have a way for doing plugin's in my gui app. These plugins have to talk to a webservice to do database calls. I've done the DB access as a web service so it can be shared with the rest of the...
7
by: Mike Livenspargar | last post by:
We have an application converted from v1.1 Framework to v2.0. The executable references a class library which in turn has a web reference. The web reference 'URL Behavior' is set to dynamic. We...
2
by: James | last post by:
Hello, I have an existing MFC C++ project which I need to add the ability of sending WSDL calls out to a web service. When this project is deployed the web service URL will always change...
1
by: slink9 | last post by:
I have VS2005 Professional with VWD and have a need to develop static as well as dynamic web sites. I am trying to modify my existing static web site which can be easily done in Expressions Web. ...
11
by: bob | last post by:
Hi, I am trying to develop a webservice and an aspx client on a Win2003 server box. The IDE is VS2008. The thing just seems totally flaky. Webservice compiles and publishes with no errors....
4
by: eschneider | last post by:
I get the following error when trying to browse the .asmx. I get the same thing when trying to add a reference. using .NET 2.0 There is no error message. Any ideas? Thanks,
4
by: =?Utf-8?B?ZmFpcnl2b2ljZQ==?= | last post by:
Hi, i create an asp.net webservice, then reference this webservice in another project in the same machine, it works well when using "localhost" to locate the webservice but fails when using the ip...
5
by: VictorG | last post by:
Hello, I am trying to secure a webservice using WSE 3.0 and the turnkey usernameForCertificateSecurity profile. I am passing a valid username token, and on the server I have overridden the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.