Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

URL Behaviour in a Visual Studio Web Reference

Please can some one explain exactly what the URL Behaviour (Static or Dynamic) property for a Web Reference in Visual Studio is for.

I believe it affects where the URl for the Web Service is stored but I don't have a clear understanding.

like image 300
David A Gibson Avatar asked Oct 07 '09 12:10

David A Gibson


2 Answers

Here's a bit more complete answer.

Dynamic automatically adds a setting that specifies Web Service URL. Yes, it can be managed through app.config, but the setting must reside in a specific place of app.config under <applicationSettings>.

Static makes the proxy's constructor to initialize Url property to its original value.

So if you have your own URL handling (e.g. the URL is retrieved from the database or resides in another section of app.config), URL Behaviour must be Static and changed later in your custom code.

like image 198
bytebuster Avatar answered Oct 03 '22 08:10

bytebuster


I believe it affects where the URl for the Web Service is stored but I don't have a clear understanding.

That's right.

If you set it to dynamic, afterwards you can change url of web service (WebService.Url). Details here.

like image 26
Janis Veinbergs Avatar answered Oct 03 '22 09:10

Janis Veinbergs