Friday, September 16, 2011

Visio Graphic Service Protocol

Visio Graphic Service Protocol is used to retrieve information about a Web Drawing (which is usually stored in a .vdw format) in a SharePoint document library. SharePoint as an application uses this protocol to retrieve data and display the graphic on the site. When we open a Visio diagram in SharePoint site, the Visio protocol client calls the server for information. The information is either returned in raster or vector format. Raster file data is returned as .png (portal network graphic) format while a vector data is returned as XAML.

Visio Graphic Services uses SOAP (Simple Object Access Protocol) for formatting request and response received from the server. The information is transmitted using TCP IP protocol (either through HTTP or HTTPS, depending on the way you have configured Visio Service Application). Following Diagram shows the messaging and transport stack used by the service.



Following are the pre-requisites for the service protocol to work properly:
  • Service endpoint. 
  • Appropriate permissions to call the method from VisioGraphicService.svc 
  • Token based security mechanism
SharePoint acts as the client requesting the information. Visio Service is hosted in a website known as “SharePoint Web Services”. The sub directory name is usually a GUID. Search through the contents of the site and you will find that VisioGraphicService.svc is hosted in one of the directories of the web application.


Open IIS Manager and check the Content view of the “SharePoint Web Services” web application. You should see a similar picture as above. The GUID might differ though.

VisioGraphicService.svc acts a a service endpoint and is needed to communicate and transfer data across. SharePoint Web Services web application uses TCP port 32843 (HTTP) and TCP port 32844 (HTTPS) for communication. Usually a default configuration of SharePoint uses HTTP port for communication unless you specific any other setting from Central Administration site.

Ensure we have these port(s) open. In case firewall is blocking the ports or you are facing any network issue, Visio diagrams may fail to refresh or may not render at all. Just in case, I am documenting some sample error messages I received because TCP 32843 port was blocked.

w3wp.exe Visio Graphics Service Web Access 8046 Critical Failed to get Vector Diagram for visio file (null) page (null) Exception : Could not connect to http://servername:32843/virtualDirectoryID/VisioGraphicsService.svc. TCP error code 10061: No connection could be made because the target machine actively refused it :32843.
w3wp.exe Visio Graphics Service Web Access High BeginGetVectorDiagram failed: System.OperationCanceledException: The server failed to process the request. ---> System.ServiceModel.EndpointNotFoundException: Could not connect to http://servername:32843/virtualDirectoryID/VisioGraphicsService.svc. TCP error code 10061: No connection could be made because the target machine actively refused it :32843. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it :32843


See Microsoft Technet Article for details about ports that need to be open for communication: http://technet.microsoft.com/en-us/library/cc262849.aspx#ServiceApp

No comments:

Post a Comment

You might find these articles useful