I'm trying to define a service endpoint in my web.config file so that I can point our staging build to a staging web service and a different end point for production. There's a question here that deals with web references in Visual Studio 2005/2008. I'm adding a service reference and can't seem to find anything in properties that would allow me to define the Url Behaviour as dynamic.
I'd like to define the url in the appSettings. Does anyone know how this works in Visual Studio 2010 for Service References?
You can change the end point using what is known as a config transformation.
In short, a config transformation allows you to tweak various config settings depending on your deployment. This is a technique commonly used for changing connection strings as well.
Here's more reading: How to: Transform Web.config When Deploying a Web Application Project