You're welcome.
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.)
--------------------
Thread-Topic: Dynamic URL Behavior & Configuration
thread-index: AcYilF1YQnypYsFySsWvL78NqSxC/w==
X-WBNR-Posting-Host: 209.77.204.49
From: "=?Utf-8?B?TWlrZSBMaXZlbnNwYXJnYXI=?=" <wally417@newsgroups.nospam>
References: <193269E2-57C3-44F2-BC55-23C75CDE783A@microsoft.com>
<KRE6HliIGHA.1236@TK2MSFTNGXA02.phx.gbl>
Subject: RE: Dynamic URL Behavior & Configuration
Date: Thu, 26 Jan 2006 08:20:04 -0800
Lines: 102
Message-ID: <10971C7B-BF16-428D-864A-24F324DB8435@microsoft.com>
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!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
microsoft.public.dotnet.framework.webservices:1348 3
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
Thank you, Steven. Given your response I looked in the app.config file in
the
class library project and found the <applicationSettings> and associated
section handler entry in <configSections>. I copied those into the
executables .config file and now all is working as planned.
Mike
"Steven Cheng[MSFT]" wrote:
[color=blue]
> 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[/color]
the[color=blue]
> 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[/color]
just[color=blue]
> 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=?=" <wally417@newsgroups.nospam>
> Subject: Dynamic URL Behavior & Configuration
> Date: Wed, 25 Jan 2006 15:12:02 -0800
> Lines: 28
> Message-ID: <193269E2-57C3-44F2-BC55-23C75CDE783A@microsoft.com>
> 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
> Xref: TK2MSFTNGXA02.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[/color]
what[color=blue]
> 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
>
>
>
>[/color]