Force data refresh for published diagrams


When you publish Visio diagrams with Visio 2010 Professional or Visio 2010 Premium using the new Web Diagram file format (VDW), Visio Services can render these diagrams in the browser.  Better yet, if these published diagrams are linked to a supported data source Visio Services can refresh the linked data in the diagram as well, including updating any Data Graphics.  Click here for an overview of Visio Services.

If you have viewed data connected diagrams using Visio Services then you are familiar with the security prompts warning you that the diagram you are viewing is linked to a data source and enabling Refresh will update the data linked to the diagram from the external data source, ensuring that you trust the data source the diagram is linked to.

clip_image004

I have been asked many times now how to disable this prompt so that diagrams are always refreshed and the user is never prompted to trust the operation.

DO THIS AT YOUR OWN RISK

The reason for this security prompt is to allow the user the chance to trust the query that is defined in the published Visio diagram.  If you force the refresh this will cause the embedded queries for all published Visio diagrams to be trusted for all users that view the diagram in the browser.

ForceRefresh = true

To alter this behavior you will need to add a setting to the web.config file for the Visio Services service application.

The web.config file can be found here…

C:\Program Files\Microsoft Office Servers\14.0\WebServices\Shared\VisioGraphicsServer\

Edit this file in NotePad and simply add the following section and setting to the configuration section if it does not already exist…

  <appSettings>

    <add key="ForceRefresh" value="true" />

  </appSettings>

After making the modifications, the web.config file should look like this…

clip_image002

You will need to recycle the application domain for the Visio Graphics Service service application to pick up this change to the web.config file immediately, or you can  wait for it to pick up this change on its own.