views:

232

answers:

1

To use the web service that is part of an SSRS installation, it seems that you need to add a web reference to your project so that you can call it etc (see one of my previous questions).

But if I needed to call the web service for different SSRS installations then i need to keep adding extra web references. My asp.net application currently displays reports from several different SSRS installations, not just a single server...

Is there a way to either dynamically add the web reference or to dynamically change the server address of where the web service is located?

A: 

You don't need to add extra web references.

If you select the web reference in Solution Explorer, then look at the Properties grid, you'll see that you can set the URL to be Dynamic. That will take the URL from the app.config or web.config. Simply change the configuration when you change servers.

If you need to do this at runtime, the proxy class for your service has a Url property that you can set.

John Saunders