Hi,
I had a web server contained a web service.
We had to change the web server computer; so all client proxies must point
to new web server. My understanding is we have to compile all client
applications again.
We will probably change the address of web server in future again.
Is there any way that client applications programatically change the address
of web service in the proxy? I am thinking to have the address in
app.config, so we don't have to compile all client application any time that
we change the address of web server.
Thanks,
Alan 2 1247
Hi Alan:
In the Solution Explorer window, highlight the reference to the web
service under the Web References node, then view the properties.
Change the URL Behavior property from Static to Dynamic.
The web service proxy will now read the URL from web.config. Looking
in web.config you should see the IDE made an entry looking like:
<add key="WebApp.loc alhost.Service1 "
value=http://server/WebService/Service1.asmx
/>
Now you can change the endpoint without a recompile.
HTH,
--
Scott http://www.OdeToCode.com/blogs/scott/
On Mon, 8 Nov 2004 23:46:18 -0500, "A.M" <no*****@online .nospam>
wrote: Hi, I had a web server contained a web service.
We had to change the web server computer; so all client proxies must point to new web server. My understanding is we have to compile all client applications again.
We will probably change the address of web server in future again. Is there any way that client applications programatically change the address of web service in the proxy? I am thinking to have the address in app.config, so we don't have to compile all client application any time that we change the address of web server. Thanks,
Alan
Thanks for Scott's suggestion.
Hi Alan,
As Scott has mentioned, we can dynamically change the webservice's client
proxy class's target url(asmx file's url). We can dig into the client proxy
class(WSDL.EXE generate for us)'s code, you'll find the class is something
like:
public class MyService :
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol {
/// <remarks/>
public MyService() {
this.Url = "http://sha-schang-01/myservice/myservice.asmx" ;
}
.......
And the "Url" property is just the one we need to update when the
webservice's deployment server changed.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jerome Cohen |
last post by:
AI am trying to call a third-party web service. this service expects an XML
fragment that contains the request plus other parameter. adding the web
reference created the syntax below(reference.vb).
I changed the data type for the structure that contains the XML data from
the default "String" to "xml.xmldocument" to enable easy filling of the
data.
my client code creates an XML document class, fills the data using standard
xml dom...
|
by: pwilliams |
last post by:
NCOALink Change of Address Verification
Each year over 40 million Americans change their mailing addresses.
This change is equivalent to every person in California deciding to
change addresses and not tell you that they have moved. This
uncertainty results in wasted spending on undeliverable address mail,
returned mail and processing fees related to direct mail campaigns.
NCOALink solves this problem for you.
NCOALink provides you...
|
by: Richard Collette |
last post by:
Hi,
I have a service, that runs perfectly when executed outside of the web
service environment. When called as a web service I get the exception
listed below sporadically. A call to the web method may succeed one time and
not another. I cannot find any reason why it would work one time and not
another. The exception occurs every two or three calls to the web method.
The service utilizes a COM component provided by PeopleSoft...
|
by: Kim Floyd |
last post by:
We have an application that uses .Net remoting to allow remote servers to
connect to a master server to synchronize data. The format of the url we use
to the master server looks like “tcp://master.company.com/wilson.server”. If
the IP address of the master server changes the remote server keep using to
old IP address until they are restarted.
The A rescored in the DNS server has a Time To Live setting of 1 hour. Why
does the...
|
by: DLN |
last post by:
Hello all,
I'm running into a problem with one of our site's production web
applications that was written in VB.net. The web app is running on
W2K3/IIS6 and up until this afternoon, was working just fine. The
application calls a web service that exists as an application under the main
application's root directory, and it looks as though this is where the
application dies. The UI returns "The request failed with HTTP status 400:
Bad...
| |
by: =?Utf-8?B?cmtibmFpcg==?= |
last post by:
I was executing the steps given in http://suppor.microsoft.com/kb/308359 for
testing a sample web service application. However, the following line gives a
compilation error:
localhost.Service1 xxx = new localhost.Service1();
localhost is not recognized by the compiler.
|
by: g-forsmo |
last post by:
Hi!
I am trying to implement a web service after a wsdl generated from BEA
Web logic. I have used a tool called WSCF - Schema-Based Contract-
First Web Services to generate a web service from a given wsdl. That
works, but when I test my web service I can't get the right port name
and binding as in the wsdl from Web logic.
When opening a web browser and write...
|
by: Jeova Almeida |
last post by:
Hello,
I created a simple web service for testing purpose in Visual Studio 2005:
<%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs"
Class="WSTest" %>
using System;
|
by: Jeova Almeida |
last post by:
Hello,
I created a simple web service for testing purpose in Visual Studio 2005:
<%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs"
Class="WSTest" %>
using System;
|
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,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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 projectplanning, coding, testing, and deploymentwithout 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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |