Hi Mike,
Welcome to MSDN newsgroup.
Regarding on the Webservice proxy with dynamic URL behavior's url string
stroage question, based on my understanding, in vs 2005/.NET 2.0 project,
we still persist the URL string for dynamic behavior webservice proxy in
application config file (app.config or web.config....). yes, .NET 2.0
class library or desktop app project(winform or console) do use a new
AppSettings class to store and retrieve such configuration info (like
webservice url string , connection string....). However, if we dig into
that appsettings class's code, we'll find that will also point to the
application configuration file (app.config ) underlyingly. So for your
scenario, when you add a web reference in class library project, you'll
find that the class library will add a app.config file in it which has the
entry that store the URL string (if using Dynamic Behavior). So when we
deploy the class library assembly(add referece to it ) in target client
application(winform, asp.net ,or console...), we can just override (or just
copy) the setting in our class library project's app.config to the target
application 's application config file (app.config or web.config...)
Hope this helps. Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
Thread-Topic: Dynamic URL Behavior & Configuration
thread-index: AcYiBL/X/vTGsN4ITVe0D7o2pLoP6A==
X-WBNR-Posting-Host: 209.77.204.49
From: "=?Utf-8?B?TWlrZSBMaXZlbnNwYXJnYXI=?=" <wa******@newsgroups.nospam>
Subject: Dynamic URL Behavior & Configuration
Date: Wed, 25 Jan 2006 15:12:02 -0800
Lines: 28
Message-ID: <19**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGXA03.phx.gbl
microsoft.public.dotnet.framework.webservices:1347 2
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
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
following
code:
this.Url =
global::ClassLibraryName.Properties.Settings.Defau lt.WebServiceName
and I see in Settings.settings in the class library an entry for the web
service. Applications deployed under v2.0 are indeed using the URL
specified
in Settings.settings.
It looks to me as if the web reference is no longer using the exe.config
file to pick up the url for the web service, and it is not clear to me what
file needs to be modified when the application is deployed to specify the
location of the URL for that deployment.
How should web references be configured to allow dynamic specification of
their URL, and which deployed files need to be altered to specify the URL?
Thank you,
Mike