3.3. Understanding FrontPage Remote Procedure Call

When you open an FPSE-extended Web site (or a SharePoint site) for live editing, SharePoint Designer internally has to perform a lot of operations, such as discovering the remote-authoring mechanism supported by the Web site, opening the site, listing the files and folders of the Web site, and determining the properties associated with the files. Even more such background operations need to be performed to implement other SharePoint Designer features, such as saving Web pages, publishing content, etc.

SharePoint Designer accomplishes these operations by using an HTTP-based protocol called FrontPage Remote Procedure Call (RPC). This protocol is the key component enabled for use on a Web site when you extend it with FPSE (or set up a SharePoint site).

The remote-authoring operations are performed in the FrontPage RPC protocol by using Web methods. A Web method, simply put, is a function implemented by the remote-authoring mechanism (FPSE or SharePoint) that performs a specific operation. For example, the Open Service Web method offered by FPSE provides the necessary metadata information about a Web site that SharePoint Designer can later use to open the Web site.

3.3.1. Investigating basic HTTP communication

To understand FrontPage RPC better, I take you through the operations performed when you open an FPSE-extended Web site in SharePoint Designer and then discuss the Web methods involved:

  1. Open Fiddler and then choose File Capture Traffic to ensure that Fiddler is set to capture HTTP traffic. You use this tool to capture HTTP Web sessions while opening an FPSE site in SharePoint Designer.

  2. Open SharePoint Designer and then choose File Open Site to open a Web site extended with FPSE. Fiddler captures the Web sessions that take place during the processing of opening the site, as shown in Figure 3.5. Unless you receive an error while opening the site in SharePoint Designer, for this exercise, you need to concentrate only on the HTTP Web sessions in Fiddler that show 200 in the Results column.

    NOTE

    Depending on whether this is the first time you've opened this site in SharePoint Designer, you might see that some of the Web sessions discussed might be missing. SharePoint Designer caches information received from some Web methods to reduce the HTTP traffic and improve efficiency.

  3. Click the Web session with /_vti_inf.html in the URL column. This Web page is in the root folder of your Web site after you extend it with FPSE. The HTTP response to this request for _vti_inf.html tells SharePoint Designer about the relative URLs of the various server executables (primarily shtml.dll, author.dll, and admin.dll) that enable remote authoring. These executables are installed with FPSE and SharePoint. SharePoint Designer uses these relative URLs to formulate its next requests for the open site operation.

  4. Click the Web session with /_vti_bin/shtml.dll/_vti_rpc in the URL column. If you view the raw HTTP request in the top pane inside the Session Inspector tab for this session, the use of the Server Version Web method appears at the end of the HTTP request. The FrontPage RPC Web methods are always sent at the end of the Web request after the HTTP headers. The response to this Web method tells SharePoint Designer about the version of FPSE the Web site is extended with. SharePoint Designer uses this version to formulate the next HTTP request.

    Figure 3.5. An HTTP Web session captured by Fiddler for the SharePoint Designer open site process
  5. Click the first Web session with /_vti_bin/_vti_aut/author.dll in the URL column. The author.dll is the executable that provides the main server remote-authoring functionality for SharePoint Designer. In the HTTP request, the Open Service Web method response tells SharePoint Designer metadata information about the Web site it needs to open.

  6. Click the next Web session with /_vti_bin/_vti_aut/author.dll in the URL column. This HTTP request has the List Documents Web method. The Web server's HTTP response to this Web method tells SharePoint Designer about the list of files and folders inside the Web site and the metadata information about the files and folders.

As indicated by these steps, FrontPage RPC Web methods are heavily used by SharePoint Designer to provide even the most basic functionality. Troubleshooting remote-authoring issues with SharePoint Designer usually involves determining which Web method is being executed at the time the problem occurs.

3.3.2. Exploring FrontPage RPC

If you examine an HTTP request in the last step in the previous exercise, after the initial verb and the header information, SharePoint Designer sends this RPC method:

method=list+documents%3a5%2e0%2e2%2e6790&service%5fname=&listHidd
   enDocs=true&listExplorerDocs=false&listRecurse=false&listFiles
   =true&listFolders=true&listLinkInfo=true&listIncludeParent=tru
   e&listDerived=false&listBorders=false&listChildWebs=true&listT
   hickets=false&initialUrl=&platform=WinI386

The name of this method is List Documents, and it takes the parameters service name, listHiddenDocs, listExplorerDocs, listRecurse, listFiles, listFolders, etc. The whole text is URL-encoded for fidelity across the Internet connection. As evident, SharePoint Designer uses this Web method to request FPSE on the Web server to send folder information about the Web site. The Web server HTTP response (that FPSE helps formulate) contains the information and metadata about the files and folders inside the Web site. SharePoint Designer then uses this information to display the list of files and folders inside the Web site.

3.3.3. Understanding the use of FrontPage RPC methods

Like Open Service and List Documents RPC methods, FPSE has a number of other Web methods that are used by SharePoint Designer (and other Office applications) to enable their features. Table 3.1 lists some of the important FrontPage RPC methods. Because SharePoint sites also have their FPSE lineage, these proprietary Web methods are also used when authoring against SharePoint sites in SharePoint Designer.

Table 3.1. Common FrontPage RPC Methods
RPC MethodDescription
Server versionRequests for the version of FPSE or SharePoint installed on the Web site
Open serviceRetrieves the information about the Web site for use in the client application
URL to Web URLConverts the given URL into the URL of the Web site containing the given URL
List documentsProvides the list of documents and folders inside the Web site. Also provides the metadata, such as creation time, modified time, author, etc., associated with the files for display in the client application
Get documentRetrieves the document specified in the RPC method to the client for display
Get documentsProvides the list of documents asked for in the parameter information of the RPC method to the client application

While SharePoint Designer internally uses these methods, you can also consume these RPC methods in a custom program to query information and perform operations related to FPSE and SharePoint.

NOTE

For a more complete reference to FrontPage RPC methods, visit this Web site: http://msdn.microsoft.com/en-us/library/ms954084.aspx.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.235.62