Visual Studio Tools for Office (VSTO) is a powerful tool to develop office based application. By deploying the VSTO solution into SharePoint document library, it will greatly reduce the maintenance effort (No need to push all the files into client machine).
Deployment architecture
There are 3 machines involved in deployment:
1. SharePoint server: The VSTO document (dot, doc, xlt or xls, etc) is uploaded to SharePoint server (either in document library or as document template).
2. File server: This server contains all the supporting files of VSTO document (.dll and configuration files, etc).
3. Client manchine: This is the client. The only thing need to be done is create security policy to specify the location of VSTO document and assembly.
Steps to deploy VSTO solution to SharePoint document library.
1. Create a VSTO project. Let's assume the project name is Proposal. It contains a Word template file Proposal.dot file. The project compiles into an assembly called Proposal.dll. Publish the project to a network share (e.g. \\fileserver\vsto\proposal). The published content looks like this:
\\fileserver\vsto\proposal
|-- Proposal.dot
|-- Proposal.dot.application
|-- Proposal.dot_1.0.0.0 (folder)
2. Create a custom document library based on existing document library. Change the document template to Proposal.dot. Copy Proposal.dot file into doctemp\Word folder in your site definition.
3. Create a document library called vstodoc using the newly created document library template.
4. In client machine, configure security policy using caspol.exe command
Deployment architecture
There are 3 machines involved in deployment:
1. SharePoint server: The VSTO document (dot, doc, xlt or xls, etc) is uploaded to SharePoint server (either in document library or as document template).
2. File server: This server contains all the supporting files of VSTO document (.dll and configuration files, etc).
3. Client manchine: This is the client. The only thing need to be done is create security policy to specify the location of VSTO document and assembly.
Steps to deploy VSTO solution to SharePoint document library.
1. Create a VSTO project. Let's assume the project name is Proposal. It contains a Word template file Proposal.dot file. The project compiles into an assembly called Proposal.dll. Publish the project to a network share (e.g. \\fileserver\vsto\proposal). The published content looks like this:
\\fileserver\vsto\proposal
|-- Proposal.dot
|-- Proposal.dot.application
|-- Proposal.dot_1.0.0.0 (folder)
|-- Proposal.dot
|-- Proposal.dot.application
|-- Proposal.dot.dll
|-- Proposal.dot.dll.manifest
2. Create a custom document library based on existing document library. Change the document template to Proposal.dot. Copy Proposal.dot file into doctemp\Word folder in your site definition.
3. Create a document library called vstodoc using the newly created document library template.
4. In client machine, configure security policy using caspol.exe command
%windir%\Microsoft.NET\Framework\v2.0.50727\caspol -m -ag LocalIntranet_Zone -url "\\FileServer\vsto\proposal\*" FullTrust -n "Proposal Assembly"
%windir%\Microsoft.NET\Framework\v2.0.50727\caspol -m -ag LocalIntranet_Zone -url "http://SharePointServer/vstodoc/*" FullTrust -n "VSTO Document"
5. Reset IIS. Navigate to http://SharePointServer/vstodoc/ and click New Document button on document library tool bar.
Comments