473,804 Members | 2,201 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding web service ref

Hi,

I am having a web application developed with me which contains a reference to a web service which is on the local network.Now I am creating the setup project for the web application. I will be deploying the application on another machine and I want to change the web reference that I have added.

As we do it for the database connection string which we put in the we.config file and could be changed later at any time. Is there any such method for changing the web reference??

Thanks in advance
Jul 21 '05 #1
2 1605
There is something called a "dynamic URL"

try this
http://msdn.microsoft.com/library/en...ItemObject.asp

To do this in VS, in Solution Explorer, highlight the Web reference in the
Properties window and change the URL behavior property from static to
dynamic. Now a corresponding appSettings section will be added to your
Web.config
"Kshitij" <Ks*****@discus sions.microsoft .com> wrote in message
news:69******** *************** ***********@mic rosoft.com...
Hi,

I am having a web application developed with me which contains a reference to a web service which is on the local network.Now I am creating the setup
project for the web application. I will be deploying the application on
another machine and I want to change the web reference that I have added.
As we do it for the database connection string which we put in the we.config file and could be changed later at any time. Is there any such
method for changing the web reference??
Thanks in advance

Jul 21 '05 #2
You can change the URL Property of your webservice reference object to the desired value.

MyWS ows = new MyWs();
ows.Url = ConfigurationSe ttings.AppSetti ngs["MyWSURL"].ToString();

You can place the url in your web.config

"Dino Chiesa [Microsoft]" wrote:
There is something called a "dynamic URL"

try this
http://msdn.microsoft.com/library/en...ItemObject.asp

To do this in VS, in Solution Explorer, highlight the Web reference in the
Properties window and change the URL behavior property from static to
dynamic. Now a corresponding appSettings section will be added to your
Web.config
"Kshitij" <Ks*****@discus sions.microsoft .com> wrote in message
news:69******** *************** ***********@mic rosoft.com...
Hi,

I am having a web application developed with me which contains a reference

to a web service which is on the local network.Now I am creating the setup
project for the web application. I will be deploying the application on
another machine and I want to change the web reference that I have added.

As we do it for the database connection string which we put in the

we.config file and could be changed later at any time. Is there any such
method for changing the web reference??

Thanks in advance


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1587
by: Jeff Dillon | last post by:
I'm using the webservice I've created: http://www.emergencyreporting.com/ERSWebService/ERSDispatch.asmx When building a client VB.NET app, and adding a web reference to the above file, I see that the client is creating extra methods. For my IncidentOpen method, the client is adding methods like BeginIncidentOpen and EndIncidentOpen. This is not an async web service, is there a corresponding web service setting I need to set so these...
3
5768
by: MIGUEL | last post by:
Hi all, I'm quite lost with how adding web references to a project creates proxy classes. I've developed a web service with two classes inside and that contains three references to three DLLs. After building it up, I've deployed it on the web server. From my Windows application, I then add a web reference to that web service.
1
3640
by: rgarf | last post by:
I have a web service that is consumed by a C++ application. I added a C# dll reference to the web service, When the web service calls a method on the dll, it sends back an HRESULT of E_FAIL to my C++ application. What is causing the web service to return an E_FAIL when it calls the method on the dll it added as a reference? Thanks
4
3527
by: razvan | last post by:
I need advice about adding security to a web service without using WSE, as the clients will run Win98.
4
3734
by: glebur | last post by:
Hi, I'm trying to create a web service client in C# but I get stuck at one of the first steps. When adding a Web reference to the Visual Studio project; I get this error (this is a translation, the English terms might not be exact) : "Error in the custom tool : Impossible to import WebService/Schema. Impossible to import binding 'cmsserverbinding' (it's the name of the binding in my WSDL file) from namesapce 'urn:cms. Impossible to...
0
1048
by: bostjanj | last post by:
Hi, I have a problem adding web service to project. I get the following error: There was an error downloading '/service.asmx'. The request failed with the error message: Object moved to '/service.asmx''.
4
2849
by: Dinsdale | last post by:
I'm looking at adding scheduling features to an application and I wanted to ask the community about any experience with scheduling components, either open source like from code project or from a vendor. I'd like to be able to create schedules and lock resources for things like collision detection (two events trying to use the same resource). I've seen some GANTT charting components but I don't think that's what I'm looking for. I'd...
0
2366
by: =?Utf-8?B?QW5keSBZdQ==?= | last post by:
Hi, I'm trying to return exceptions from a WCF Service using FaultExceptions. I got the service compiled and running. But I get an error while adding a service reference to it. The error reads: " Attempting to download metadata from 'http://localhost:4619/WCFService1/Service.svc' using WS-Metadata Exchange or DISCO. Error: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension:
2
1416
by: Jay Balapa | last post by:
Hello, We have a webservice which is called by our pocket pc apps. We have a need to filter data, so we want to add a another method on top to the existing method. Existing Service.asmx Sync(DataSet myDataset) New Service.asmx Sync(DataSet myDataset);
0
1424
by: AndyL69 | last post by:
Hello I've got a very strange Problem. When im adding a new ACE entry to a UNC Direcotry the inherented ACL's will be lost. When I'm adding a new ACE to a directory / file in this UNC path the inherented ACE are still available. What's wrong ? I don't understand the difference between \\server\share and \\server\share\directory while adding a ACE AndyL Sample: \\myserver\myshare Inherited ACE: Administrators, Network Service
0
9711
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
9593
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
10595
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
10343
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...
0
9169
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6862
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
5668
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
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
3831
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.