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.


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.


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…


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


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


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.

Comments (5)
  1. Martin Neuhard says:

    This is great for forcing a refresh, but I want to disable the refresh and not allow a user to refresh the data.  Is there anyway I can just close the window without allowing users the options?  Reason is my drawing draws data from a different sharepoint farm, I have no control over the config settings of the farm and if they refresh it will cause an error.  Basically I want to publish teh web viewable version, but I want the data refresh disabled and no option to pop up.


  2. Martin Neuhard says:

    I actually fixed this by digging through the libraries and just turning off the refresh.  That way I didn't get the pop up.  I didn't want the refresh anyway due to cross site security concerns.  Thanks for this article though it lead me to the solution.

  3. Richard Te Moananui says:

    I'm also looking for a way to disable the refresh.  Martin mentions "digging through the libraries and just turning off the refresh".  Which "libraries" are you talking about? and what "refresh" option? and is the magic a library option or a document option or something else?

    Thanks in advance

  4. Jeremy Taylor says:

    It may be worth mentioning here that this is a FARM wide change. In other words, this applies irrespective of the Web Application/Site Collection. Im looking for a ForceRefresh in one Web Application rather than across the farm.

    Also modifying any files directly in the SharePoint root folder makes me cringe because its not part of a WSP/feature and you can loose this modification if you do an upgrade/migrate.

  5. Martin Neuhard says:

    For the JS refresh, check out Chris's other blog posting:…/enable-visio-services-data-refresh-using-script.aspx

    Starting from this, I modified the AutoRefresh.js script line 51 to send a false instead of a true for the second parameter.  Then in the VWAHelpers file, vwalib-1.0.4.js I modified the if/then/else in the enableRefresh function to the following.

               if (entry && entry.get_visible())


           if (always)


               entry.onAction("RefreshAlways"); // this is the Enable Always button


           else if (!always)


     &nbsp; &nbsp; &nbsp; &nbsp;entry.set_visible(false); // this is the Close Button




               entry.onAction("RefreshOnce"); // this is the Enable Session button



Comments are closed.

Skip to main content