Wednesday, 18 March 2009

Windows App Web References

A simple one which can cause problems when deploying windows apps referencing web services.

Make sure that you web service reference is setup using Dynamic URL Behaviour.

You can see the effect of this in the Reference.vb Sub New, where it reads the path to the web reference from the app.config (as we would like to happen):


This is defined as a property of the web reference:


If you change the web service property URL Behaviour to Static the Reference.vb Sub New is automatically updated for you by Visual Studio and is then hard coded to your local development machine (not good):


No comments: