{"id":4392,"date":"2014-03-30T10:28:03","date_gmt":"2014-03-30T10:28:03","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/unable-to-change-url-for-net-reference-to-dynamic-web-service-collection-of-common-programming-errors\/"},"modified":"2014-03-30T10:28:03","modified_gmt":"2014-03-30T10:28:03","slug":"unable-to-change-url-for-net-reference-to-dynamic-web-service-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/unable-to-change-url-for-net-reference-to-dynamic-web-service-collection-of-common-programming-errors\/","title":{"rendered":"Unable to change URL for .NET reference to dynamic web service-Collection of common programming errors"},"content":{"rendered":"<p>Regardless of whether the web reference is set up as dynamic, note that you always have the option of setting the Url property on the web service object in code\u00a0prior to calling the method on that object that performs the call.\u00a0 This gives you full control over what URL is used.<\/p>\n<p>&gt; Settings.settings<\/p>\n<p>Not sure what Settings.settings has to do with this.\u00a0 Should only be app.config involved.<\/p>\n<p>&gt;\u00a0 URL in the settings file<\/p>\n<p>Not surprising, since I don&#8217;t think it uses a settings file.\u00a0 It should use app.config (actually, <em>yourexename<\/em>.exe.config is the config file used but the build process makes a copy of app.config that is renamed this way and located in the same folder as the .exe).<\/p>\n<p>&gt;\u00a0 it is still showing the old URL<\/p>\n<p>IIRC, you won&#8217;t see this change in the Visual Studio designer.\u00a0 This is a design-time thing, but at runtime it should use what is in app.config.<\/p>\n<p>&gt; so that you can change the URL elsewhere<\/p>\n<p>A more correct description would be so that you can change the URL via the .config file.\u00a0 For truly arbitrary control over the URL, you need to write code that sets the Url property as I mentioned earlier.<\/p>\n<p>See this for more info on how dynamic web service references work: http:\/\/www.knowdotnet.com\/articles\/dynamicwebserviceurls.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Regardless of whether the web reference is set up as dynamic, note that you always have the option of setting the Url property on the web service object in code\u00a0prior to calling the method on that object that performs the call.\u00a0 This gives you full control over what URL is used. &gt; Settings.settings Not sure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4392","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4392"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4392\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}