Web Reference "URL Behavior"

  • Thread starter Thread starter dreamer
  • Start date Start date
D

dreamer

I have a .NET application for PocketPC that uses a Web Reference. I need to
be able to dynamically change the URL of this web reference and have read
about the "URL Behavior" property of the Web Reference and changing it to
Dynamic, but I don't have this property for some reason. Is it because it
is a PocketPC application? How else can I change the URL dynamically?
 
Thank makes sense, but I still thinking I'm missing something. I want to be
able to set the URL dynamically, via the config file.

I don't have a app.config file that I read about, or the URLBehavior
property on my web reference. Does this only apply to desktop applications,
not PocketPC? Am I misunderstanding something?

Here's a snippet from the place I'm reading.
==============================
As we look to deploy our Dilbert application to other desktops, we may want
to provide some functionality to change the URL our web service points to.
Using Visual Studio .NET and the .NET Framework, this is as simple as
changing the URLBehavior property on our web reference from static to
dynamic. When you change to dynamic, a key entitled
"DilbertServiceClient.MattBerther.DailyDilbert.DilbertService" will be added
in the app.config file. The value of this key is the URL to point to for
consumption of the web service.
==============================
http://www.codeproject.com/useritems/dilbertservice.asp
 
Since there's no config file support, you need to use other means of
configuring your application. It could be an xml file or registry data. On
application startup, read configuration and use the specific url with your
web service
 
Back
Top