473,748 Members | 9,913 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic URL for WebService in VS2008

bkreitman
5 New Member
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 2457
Plater
7,872 Recognized Expert Expert
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 Recognized Expert Specialist
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
bkreitman
5 New Member
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
bkreitman
5 New Member
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
3083
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 open the reports and manually change the datasouce to the production database. Is there a way to set the datasouce on the webserviced reports dynamically? (A datasource property or something?) cant seem to find anything. Thanks!
5
7091
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 company, if not for the want of reuse the gui app would have just simply accessed the DB Directly and each plugin in would have been fully self contained. Each time I create a new gui plugin I find myself modifying the web service to add new support...
7
22491
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 added an entry to the executable's .exe.config file to specify the URL, and under the 1.1 framework this worked well. Unfortunately, this is not working under the 2.0 framework. I see in the Reference.cs file under the web service reference the...
2
2540
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 depending on the user's local setup. I can use the "Add a Web Reference" wizard to do this, however when the project is in C++ the option to set the URL Behaviour to Dynamic is not in the property list. I noticed if I create a C# project however,...
1
1151
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. Can I accomplish this just as easily using tools in VS2005? How? Would VS2008 be better?
11
2113
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. Access the Service with http://localhost:2092/EasyVend0r.asmx (Note using the port assigned by the IDE) and no problem. But start a browser and go to access the ASMX with the published URL
4
4441
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
1974
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 address of my machine (neither does using the hostname), it says "downloading webservice error because of the destination machine rejecting..." It seems not a development problem but one of the windows configuration, i just hope get some help...
5
2752
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 Authenticate token call and it is being called. My ASP.NET service has a Login() method and it is being called during client application startup. Both the client and service have matching policy config files. Once authentication
0
8984
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9530
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9363
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9312
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.