Partilhar via


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.

Comments

  • Anonymous
    October 17, 2012
    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.Thanks!
  • Anonymous
    December 13, 2012
    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.
  • Anonymous
    December 17, 2012
    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
  • Anonymous
    January 17, 2013
    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.
  • Anonymous
    January 24, 2013
    The comment has been removed