Why can’t I save edited documents back to TFS via Team System Web Access like I can with Team Explorer?

If you have ever user Team System Web Access to work with TFS, specifically the Documents tab,  you may have discovered that it is possible to open documents via this interface, but if you try to save your changes back to TFS you can’t do it… or at least not as easily as you could if you had opened the document via Team Explorer. Take the following scenario for example: let’s say there’s a team project with a SharePoint document library at sharepoint/site1/ and the user has Microsoft Word as the registered handler for .DOC files on their machine:

Using Team Explorer

  • User opens Team Explorer and double clicks Report.doc
  • Team Explorer launches Microsoft Word and tells it to open sharepoint/site1/Report.doc
  • Microsoft Word realizes that the document is on a SharePoint server, and it talks directly to the SharePoint to check-out, modify, and check-in the document

Using Team System Web Access (TSWA)

  • Users opens TSWA, goes to the Documents tab and clicks on Report.doc
  • TSWA downloads the document from SharePoint
  • TSWA writes the document back to the Asp.Net response
  • User is presented with SAVE and OPEN options in the web browser…
    • If the user chooses SAVE, browser downloads the document and saves it to C:\Docs (for example – user’s choice)
    • User manually opens C:\Docs\Report.doc
    • If the user chooses OPEN, the browser will save Report.doc to Temporary Internet Files and launch Microsoft Word to open the document from that location
  • Regardless of the choice (OPEN or SAVE), at this point there is no persistent connection between Report.doc and the SharePoint server. The user is working with the local copy and any changes are saved to the local copy. This means the user needs to “upload” the local copy back to TSWA, so TSWA can upload it back to SharePoint on behalf of the user. See “How to: Check Documents In and Out of a Document Library (Team System Web Access)” on MSDN for details on how this process flows.

The key thing to remember is that TSWA acts as a gateway between the user and the SharePoint. The reason that TSWA works this way is because there are certain scenarios where the end user might not have direct access to the SharePoint server (for example, I expose TSWA to the Internet, but my TFS, SharePoint and Reporting sites are not externally accessible from the Internet).

Currently, we’re using the same approach for TSWA 2010 (which is now a part of TFS 2010). However, TSWA 2010 will provide a way to directly access the documents on SharePoint:

image 

I hope this help you understand the differences in document modification between TSWA and Team Explorer.  Admittedly it is less convenient to modify documents via TSWA, but if you take a few moments to reference the “How to: Check Documents In and Out of a Document Library (Team System Web Access)” topic on MSDN you will see that it is just a few more clicks of the mouse, ultimately – both TSWA and Team Explorer can provide access to and versioning of your TFS documents.

-Trev

PS: Thanks to Chris Cooper & Hakan Eskici for their contributions to this post.

 

Technorati Tags: Team Foundation Server,Team System Web Access