RE: Dynamic URL Behavior & Configuration
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Thu, 26 Jan 2006 03:33:18 GMT
{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\lang2052\f0\fs20 Hi Mike,
\par
\par Welcome to MSDN newsgroup.
\par 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...)
\par
\par Hope this helps. Thanks,
\par
\par Steven Cheng
\par Microsoft Online Support
\par
\par Get Secure! www.microsoft.com/security
\par (This posting is provided "AS IS", with no warranties, and confers no rights.)
\par
\par
\par
\par
\par
\par \pard\li720 --------------------
\par Thread-Topic: Dynamic URL Behavior & Configuration
\par thread-index: AcYiBL/X/vTGsN4ITVe0D7o2pLoP6A==
\par X-WBNR-Posting-Host: 209.77.204.49
\par From: "=?Utf-8?B?TWlrZSBMaXZlbnNwYXJnYXI=?=" <wally417@xxxxxxxxxxxxxxxxx>
\par Subject: Dynamic URL Behavior & Configuration
\par Date: Wed, 25 Jan 2006 15:12:02 -0800
\par Lines: 28
\par Message-ID: <193269E2-57C3-44F2-BC55-23C75CDE783A@xxxxxxxxxxxxx>
\par MIME-Version: 1.0
\par Content-Type: text/plain;
\par \tab charset="Utf-8"
\par Content-Transfer-Encoding: 7bit
\par X-Newsreader: Microsoft CDO for Windows 2000
\par Content-Class: urn:content-classes:message
\par Importance: normal
\par Priority: normal
\par X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
\par Newsgroups: microsoft.public.dotnet.framework.webservices
\par NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
\par Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
\par Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.framework.webservices:13472
\par X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
\par
\par We have an application converted from v1.1 Framework to v2.0. The executable
\par references a class library which in turn has a web reference. The web
\par reference 'URL Behavior' is set to dynamic. We added an entry to the
\par executable's .exe.config file to specify the URL, and under the 1.1 framework
\par this worked well. Unfortunately, this is not working under the 2.0 framework.
\par
\par I see in the Reference.cs file under the web service reference the following
\par code:
\par
\par this.Url = global::ClassLibraryName.Properties.Settings.Default.WebServiceName
\par
\par and I see in Settings.settings in the class library an entry for the web
\par service. Applications deployed under v2.0 are indeed using the URL specified
\par in Settings.settings.
\par
\par It looks to me as if the web reference is no longer using the exe.config
\par file to pick up the url for the web service, and it is not clear to me what
\par file needs to be modified when the application is deployed to specify the
\par location of the URL for that deployment.
\par
\par How should web references be configured to allow dynamic specification of
\par their URL, and which deployed files need to be altered to specify the URL?
\par
\par Thank you,
\par Mike
\par
\par
\par
\par \pard
\par
\par }
- Follow-Ups:
- RE: Dynamic URL Behavior & Configuration
- From: Mike Livenspargar
- RE: Dynamic URL Behavior & Configuration
- Prev by Date:
Re: optional nillable values - Next by Date:
I am getting error when trying to Add Web Reference in Visual Studio 2005. - Previous by thread:
i'm new to newsgroups so plz do consider - Next by thread:
RE: Dynamic URL Behavior & Configuration - Index(es):