title: web reference configuration issue
body: <p>I am struggling with how to configure the url to a web reference.</p>
  
  <p>Here is the case. I have:
  old asp.net webservices &lt;----- c# project that compiles to dll &lt;----- website that references the dll (the c# project didn't used to be there but I refactored all that code into a seperate project)</p>
  
  <p>So the website code calls the c# project's code to get results which in turn calls the webservice.</p>
  
  <p>When adding a web reference in the c# project I entered the url location of the webservices (<a href="http://192.168.10.1/TestServices.asmx?wsdl" rel="nofollow">http://192.168.10.1/TestServices.asmx?wsdl</a>. This then generates an app.config file containing the url of the webservices.</p>
  
  <p>If I set the web reference to static than the config should not be used, that is working. Now if I set the web reference to dynamic, the config should be used but since this is a project being compiled to a dll, and the website does not have the app.config, instead I set the configuration from the app.config to my web.config appSettings node and I changed the url to the web services to another one (<a href="http://192.168.10.2/TestServices.asmx" rel="nofollow">http://192.168.10.2/TestServices.asmx</a>.</p>
  
  <p>The website is still getting the result from the old url to which the web reference was pointed when adding it in the c# project so it looks like the config setting is not being used while the URL Behavious is set to Dynamic.</p>
  
  <p>Am I missing something trivial here, probably?</p>
  
  <p>This is the content from the app.config:</p>
  
  <pre><code>&lt;applicationSettings&gt;
       &lt;XXXX.Properties.Settings&gt;
        &lt;setting name="XXXX_TestServices_TestServices" serializeAs="String"&gt;
         &lt;value&gt;http://192.168.10.1/TestServices.asmx&lt;/value&gt;
        &lt;/setting&gt;
       &lt;/XXXX.Properties.Settings&gt;
      &lt;/applicationSettings&gt;
  </code></pre>
  
  <p>This is what I put in my web.config:</p>
  
  <pre><code>&lt;appSettings&gt;
       &lt;add key="XXXX_TestServices_TestServices" value="http://192.168.10.2/TestServices.asmx" /&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>So, now its always funny and informative/educational when during the typing of the question and double checking and search related question, you finally solve the question yourself.. I am posting it anyway with answer as I did not find the exact answer in one place but by combining 2 other questions and a blog post.</p>