473,385 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Dynamic URL Behavior & Configuration

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

Jan 25 '06 #1
7 22456
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


Jan 26 '06 #2
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:
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
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 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

Jan 26 '06 #3
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=?=" <wa******@newsgroups.nospam>
References: <19**********************************@microsoft.co m>
<KR**************@TK2MSFTNGXA02.phx.gbl>
Subject: RE: Dynamic URL Behavior & Configuration
Date: Thu, 26 Jan 2006 08:20:04 -0800
Lines: 102
Message-ID: <10**********************************@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!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:
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
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 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


Jan 27 '06 #4
I have/had the same problem going from 1.1 to 2.0. My situation is very similar to this problem. In my case I have several .NET remoting objects being hosted by IIS. The remoting classes are in separate class libs (and VS 2005 projects) and these classes DO reference webservices.

I do get the fact that I have to copy the classlib.dll.config settings to the web.config hosting app (the virtual directory hosting remoting objs) for each of my class libs that is compiled into a separate assembly. I guess I'm asking why? This is a maintenance problem as I have to copy settings from one config to another and "weave" them into the hosting application (whether that be a website or windows app).

The above do work, but still asking why this way?

Is this really what Microsoft intended developers to do? There must be a better way.

Jim
May 8 '06 #5
Hi

I am doing a similar thing, except that my class library is being referenced by a web app. I understand that the the settings need to be in the web.config file, but I can't work out where to put the <applicationSettings> element, or the settings in it.

I have tried
<appSettings>
<add key="webserviceName" value="url"/>
</appSettings>

and also copying the <applicationSettings> and <configSections> into the web.config, but the webservice is still using the settings in the Settings file.


Any help would be appreciated.
Jul 20 '06 #6
I am having the same problem.
I have a project that hits a web service. I need to include it in 2 web projects and a console app. We have a test and production environment, so I need to be able to change a config setting in the production environment to use the correct web service.
However, changing the app.config location in the project with the web service does not work. Neither does adding this setting to the app.config of the console app, or the web.config of the web projects. It seems the only setting I can change that will work is the settings file (in properties folder) of the project with the web service, however, this is not a good option as it requires a different compile for production than testing. Any changes between the two environments need to be accomplished with configuration settings, no compiles.

Hopefully someone has some insight on this... I haven't been able to find too much, because it seems most people are using the web service in their end project directly, not another project reference, in which case the "dynamic" setting works as expected.
Jul 28 '06 #7
Hi,

I have a 3rd party web service running in a Web Server within our network.
The web service sends "Hello" message when joins the network and also sends
"Bye" message when leaves the network.
I want to write a client code to receive the "Hello" message as well as the
"Bye" message sent by the web service.
Can you please suggest me a sample code, so that I can discover (dynamically
discover) the web service using the multicast discovery protocol (using
WS-Discovery).

Development Environment : VS 2005, .NET 2.0 and WSE 3.0

Thanks in Advance
--
Thanks & Regards,
John Paul. A
MCAD
"Steven Cheng[MSFT]" wrote:
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=?=" <wa******@newsgroups.nospam>
References: <19**********************************@microsoft.co m>
<KR**************@TK2MSFTNGXA02.phx.gbl>
Subject: RE: Dynamic URL Behavior & Configuration
Date: Thu, 26 Jan 2006 08:20:04 -0800
Lines: 102
Message-ID: <10**********************************@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!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGXA03.phx.gbl
Xref: TK2MSFTNGXA02.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 <applicationSettingsand 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:
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
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
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


Oct 22 '06 #8

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

Similar topics

5
by: K | last post by:
I have found a script online that I want to use (I am new to PHP). It creates dynamic images based on the text that you pass it. However, no matter how I try, I can't get anything other than a...
0
by: Rami Saad | last post by:
Hi all, I am trying to install a service using dynamic naming. I wrote values in the configuration file, and trying to assign one of those values to a string, and using this string as the name...
1
by: hybrid | last post by:
I have problems in understanding the behavior of the events triggered by dynamically created controls over a webform. Could you help me? In a webform, I have a static PlaceHolder PH containing...
7
by: Ben R. | last post by:
Hi, I'm working on an ASP.NET 2.0 site and my hosting provider has the root in a different place than I have it locally which is not a problem for most things, except for the access oledb...
7
by: Joey | last post by:
I don't care what .net language this come in but I really need to determine if a disk is dynamic or basic. I have posted something in the WMI group but no one knows how to do it. Does anyone have...
7
by: Jo | last post by:
Hi, How can i differentiate between static and dynamic allocated objects? For example: void SomeFunction1() { CObject *objectp = new CObject; CObject object;
3
polymorphic
by: polymorphic | last post by:
I have succeeded in embedding PDF files in a dynamic iframe. The problem is that I need the PDF to cache. If the PDF remains the same from page load to page load then the pdf is somehow cached with...
0
by: daylond | last post by:
I'm developing a robot control architecture, and am trying to maximize platform independence (robot hardware, not OS) by generating my individual behaviors as dynamic libraries. The individual...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...

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.