Tuesday, 18 January 2011

Configure Reporting Services to use proxy for Bing maps

If you work somewhere that uses a proxy server to connect you and your servers to the internet you will need to configure Reporting Services to use said proxy in order to use the Bing maps layer. Otherwise you will see something along the lines of the following message in your report, instead of a map:
The remote name could not be resolved: 'dev.virtualearth.net'
The solution is easy;

Step one
Navigate to the webconfig file for the instance of Reporting Services you want to proxy out to the internet. Typically for 2008 R2 this will be:
<drive name>\Program Files\Microsoft SQL Server\MSRS10_50.<instance name>\Reporting Services\ReportServer\web.config

Step two
Add the following xml fragment to the file - I usually add it in-between the</runtime> tag and the </configuration> tag, at the end of the file:

<system.net>

        <defaultProxy enabled="true" useDefaultCredentials="true">

            <proxy bypassonlocal="True" proxyaddress="http://<proxy server>"  />

        </defaultProxy>
    </system.net>

Save the file.

This of course assumes your server is allowed to proxy out in the first place (which it will need for Bing maps integration). You can test this by logging onto the server and firing up a browser or by asking your friendly local sysadmin...

6 comments:

Ian Carter said...

Hi Phil,
Is there any way to take a subset of Bing Maps tiles offline? We don't have web access for our demonstration environment.
regards,
Ian.

Phil said...

Hi Ian,

The short answer is that I'm not wawre of one. Although there may be a way of taking Bing tiles offline, I'm not sure you'd be able to integrate that as a layer in a SSRS map. Although I'm prepared for someone to prove me wrong!

Emil said...

I was after SSIS HTTP Proxy and got this one instead!

Phil do you want me to tell me you don't have an article how to use Proxy with SSIS???

Phil said...

Hi Emil,

Good point. However, as I'm sure you've discovered there is already quite a few examples of this, and I don't tend to blog about information thats easily found ealsewhere.

For example here is an example of proxy access to a web service, and here is an example of downloading a file via HTTP over a proxy.

Emil said...

Hi Phil,

The info is easily available although you were higher in google then the relevant ones. and it is not so easy when you use free proxy servers unless you find working one that you can use for development ;)

Regards
Emil

vakospb said...

Hi Phil,

I've performed changes in web.config, but after such changes I get HTTP500 error while trying to access Report Manager.