views:

24

answers:

1

Hi,

We use VS 2005 and use a lot of webservices. My understading of VS 2005 is that by default the webservice urls behaviour is set to dynamic and it picks up the url from the web.config during runtime. But strangely, I have run into cases where this is not happening. The webservice continues to use the url used to add the webreference and does not pick from the web.config.

Here are my questions

  1. Am I doing anything wrong or missing something?
  2. If no, has anybody experienced the same issue and what is the solution.

Thank you

A: 

Sure, I always have this problem, if I manually rename the ID refering to the webservice for example. To debug this, always check in web.config for the Configuration/SectionGroup[name="applicationSettings"] node, which has a child section with the name yourproject.Settings. This refers to the applicationSettings node, where you'll find the urls for the webservices.

For example if you rename the Web Service in Visual Studio, it will not update the web.config - so the applicationSettings will mapping will not work - it source will fall back to the original link under ~yourproject/Web References/yourwebservice.disco file.

It took me hours to figure it out some time ago.

balint