SlideShare a Scribd company logo
Advanced Visual Studio 2005 Tools for Office Programming and Deployment David Truxall Architect NuSoft Solutions
Agenda Server programming Security Deployment
Server Goals Make it as simple to create Office content on the server as it is for HTML Integrate with VSTO 2005  programming model Client/Server Symmetry.  Scale, Scale, Scale Integrate with ASP .NET programming model
Server Capabilities in VSTO 2005   Fill the data island on the server Program against the data on the server Run code outside the document Expose data from Office docs to ASPX
Server Feature Read and Write Cached Data ' Load the document (does not start the Office application) Dim productsDoc As String = "C:\Documents\Products0105.xls" Dim doc As ServerDocument = New ServerDocument(productsDoc) 1 ' Read the cached data from the dataset in the worksheet  Dim cdi As CachedDataItem cdi = doc.CachedDataManifest.Views("ProductWorksheet"). _ CachedData("ProductWorksheet.ProductCache") Dim sr As System.IO.StringReader = New _ System.IO.StringReader(cdi.Xml) ProductsData.ReadXml(sr) 2 ' Write the modified dataset back to the dataset ' in the workbook. cdi.SerializeDataInstance(ProductsData) doc.Save() doc.Close() 3
Data in Office Solutions How Does Server-Side Work? Server Code Server Client Server Side Code prepopulates elements before sending to client John is cool! $345.00 URL Request CreateExpense.aspx Databases Corporate Systems
Data in Office Solutions How Does Server-Side Work? Server Code Server Client Document is transferred with data URL Request CreateExpense.aspx Mike is cooler! $1000.00 Databases Corporate Systems
Filling the Data Island All the data in a VSTO 2005 enabled Office document is stored in a standard data island This enables the VSTO 2005 runtime to access the data without having to invoke Word or Excel Benefits Doesn’t require you to run Word or Excel on the server Some significant scaling issues Not supported by Microsoft
Filling A Data Island on the Server
What is Not Supported  on the Server Program against the view Since Word & Excel aren’t running on the server there’s no way to get to the object model for each application You can work around this quite easily since you can fill the data on the server and do all the databinding/view manipulation on the client Integrate with other Office apps Since they’re not running on the server However XML/Web Services provide an ideal way to do this
Server Summary Program against the data on the server Access any VSTO 2005 document from within an ASPX page Built to scale from day one
.NET Security VSTO Security managed by .NET security policy Evidence (location, signature, etc.) Permissions (execution, UI, full, etc.) Since code in VSTO documents call into the Office OM (unmanaged code), we require Full Trust permission
VSTO 2005 Security Won’t run any code by default Must trust both the document and the assembly (Full Trust) Evidence for assemblies is via Signing: Authenticode or Strong Naming Location: URL  Local Machine Zone is not enough Evidence for documents is via Location E-mail attachments must be copied to desktop (Outlook temp directory is Internet Zone)
Code Security Scenarios Alice creates a VSTO 2005 project for a Budget Spreadsheet Alice hands over final code to Bob in IT Bob deploys code & document to  http://budget   Bob deploys security policy to end users machine to trust  http://budget Fred creates a new budget from  http://budget   Code runs! Fred sends it to Sue via email Sue save the budget sheet to her desktop Opens it from the desktop Code runs!
Code Security – VeryEvil.com Evil Alice creates fakebudget.xls and creates a VSTO 2005 project Evil Alice deploys code to  http://veryevil.com/budget Evil Alice sends fakebudget.xls to Bob in email Bob opens the spreadsheet No code runs because  http://veryevil.com  isn’t trusted
Bad Trust Decision ISV Alice writes some VSTO 2005 code behind ISVBudget.xls Deploys code and budget to  http://www.budgetsrus.com   Fred creates a budget from website & saves it to his machine IT Bob discovers bug in the code behind ISVBudget.xls that compromises the corp security practices Bob tells ISV Alice but the fix won’t be ready for weeks Bob blocks access to  http:// www.budgetsrus.com  for the corporation Budgets don’t work but the corp security is safe Alice fixes bug Bob reinstates access to  http://www.budgetsrus.com The sun shines
Security Configuration
Deployment & Update Self updating Document App Manifest is updated to point to the latest assembly Manifest based deployment Application level and deployment level manifests
How Does This Work? <manifest> <deploy url= http://…/deploy.xml version=“1.0”/> <manifest> <deploy url= http://…/ deploy.xml version=“1.0.1”/> . <assembly Name=“foo.dll” updateURL= http://../1.0.1/foo.dll <manifest> <deploy url= http://…/ deploy.xml version=“1.0”/> Deploy.xml manifest.xml manifest.xml <manifest> . . curVersion-”1.0.1” Foo.xls manifest.xml Foo.dll v1.0 Foo.dll v1.0.1
Move to Production Server <manifest> <deploy url= http://…/deploy.xml version=“1.0”/> <manifest> <deploy url= http://svr2/deploy.xml version=“1.0.1”/> . <assembly Name=“foo.dll” updateURL= http://../1.0.1/foo.dll <manifest> <deploy url=  http://srv1/deploy.xml version=“1.0”/> Deploy.xml manifest.xml manifest.xml <manifest> . . curVersion-”1.0.1” <app url= “ http://srv2/  manifest.xml” Foo.xls manifest.xml Foo.dll v1.0 Foo.dll v1.0.1 Deploy.xml <manifest> . . curVersion-”1.0.1” <app url= “ http://srv2/  manifest.xml” Test Srv Production Srv
Server Object Model to modify  App Manifest CustomizedDocument doc = new CustomizedDocument (“file.doc”); doc.AppManifest.DeployManifestPath  = “…<new path>” Can change any parts of the app manifest
Why Manifests? .NET and Visual Studio moving to manifests Built using the same schema as Click Once New technology coming in the next version of .NET/VS Built into Vista Manifests provide rich information about your application Not just which dll is used Includes dependent assemblies Location of assemblies (moving to Product server)
Deployment Basics Requirements for the target machines Office 2003 Professional or Excel 2003 Standalone or Word 2003 Standalone .NET Framework 2.0 VSTO 2005 Runtime Office PIAs referenced in your assembly Can be set to install on demand Appropriate security policies
Local/Local Deployment Model Pros Network access is not required Users can modify and customize their documents  Cons Updates to document or assembly require redistribution to each user Local/Local
Local/Network Deployment Model Pros Eases updates to assembly Users can modify and customize their documents  Cons Updates to document require redistribution to each user Local / Network
Network/Network Deployment Model Pros Eases updates to assembly Eases updates to document Cons Users cannot modify or customize master documents Network / Network
Conclusion Server Program against the data on the server Access any VSTO 2005 document from within an ASPX page Security Must trust document and assembly Doesn’t run by default Deployment options Document/assembly options
© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
*** BIND LIST *** If Not Me.EmpData Is Nothing Then Me.List1.DataSource = Me.EmpData.Tables(0) Else Me.List1.DataSource = nothing End If **** FILL DATA ISLAND **** Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating Dim da As New SqlClient.SqlDataAdapter(Me.SqlDataSource1.SelectCommand, Me.SqlDataSource1.ConnectionString) Dim empData As DataSet = New DataSet() da.Fill(empData) Dim doc As ServerDocument = New ServerDocument(Server.MapPath(&quot;EmployeeServerData.xls&quot;)) Dim hostItem As CachedDataHostItem Dim dataItem As CachedDataItem hostItem = doc.CachedData.HostItems(&quot;EmployeeServerData.Sheet1&quot;) dataItem = hostItem.CachedData(&quot;EmpData&quot;) dataItem.SerializeDataInstance(empData) doc.Save() doc.Close() End Sub

More Related Content

PPTX
Web deploy
PPT
Php ppt
PPT
N-Tier Application with Windows Forms - Deployment and Security
PDF
Microsoft System Center Operation Manager 2012 Beta Installation
PDF
Bi apps 11117
DOCX
V mware view 4
PPTX
How to build view_in_onebox
PPTX
Atea sccm parallels
Web deploy
Php ppt
N-Tier Application with Windows Forms - Deployment and Security
Microsoft System Center Operation Manager 2012 Beta Installation
Bi apps 11117
V mware view 4
How to build view_in_onebox
Atea sccm parallels

What's hot (17)

PDF
Jenkins hand in hand
PPTX
End to End Guide Windows AutoPilot Process via Intune
PPT
ClickOnce Deployment Seminar
PDF
Advanced ClickOnce Deployment Techniques by Suthep S - GreatFriends.Biz
PPT
High Availability of Azure Applications
PPTX
Get started with Windows AutoPilot Deployment
PPT
Managing Virtual Infrastructures With PowerShell
PPTX
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
PPTX
Glimpse of Loops Vs Set
PPTX
Java web start Quick Reference
PPTX
Integrate Flex With Spring Framework
PPT
Maven – The build paraphernalia
PDF
Sitecore DevOps Automating your Sitecore Deployments by Naveed Ahmad
PPTX
Dont fear software patching for operational technology
PDF
Integrating Office Web Apps with SharePoint 2013
ZIP
Seo pressor unlimited-license-v4.0
PDF
How to install and configure microsoft iis 7.5, php, my sql, and phpmyadmin
Jenkins hand in hand
End to End Guide Windows AutoPilot Process via Intune
ClickOnce Deployment Seminar
Advanced ClickOnce Deployment Techniques by Suthep S - GreatFriends.Biz
High Availability of Azure Applications
Get started with Windows AutoPilot Deployment
Managing Virtual Infrastructures With PowerShell
"Don’t Run with Scissors: Serverless Security Survival Guide" | Hillel Solow,...
Glimpse of Loops Vs Set
Java web start Quick Reference
Integrate Flex With Spring Framework
Maven – The build paraphernalia
Sitecore DevOps Automating your Sitecore Deployments by Naveed Ahmad
Dont fear software patching for operational technology
Integrating Office Web Apps with SharePoint 2013
Seo pressor unlimited-license-v4.0
How to install and configure microsoft iis 7.5, php, my sql, and phpmyadmin
Ad

Similar to Advanced Visual Studio 2005 Tools For Office Programming And Deployment (20)

PDF
Office And Vsto 200
PPTX
Raj Wpf Controls
PPT
Getting Started with VSTO
PPT
Developing for Office 2007 using VSTO 2005
PPTX
Presentation on Visual Studio Tools for Office (VSTO) at HyderabadTechies
PPTX
A developers roadmap to building professional office based solutions
PPT
Session 2: Office as a development platform with Visual Studio 2008
PPT
Better Together Cx O V1 0
PPT
Better Together Cx O V1 0
PPT
Daniel Egan Msdn Tech Days Oc Day2
PPTX
VSTO + LOB Apps Information Matters
PPT
Composite Applications Speaking Tour - Lap Around Office Business Architectures
PPTX
A developers roadmap to building professional office based solutions
PPTX
VSTO + LOB Apps
PPT
Vsto 3 Excel Add-in SNUG
PPT
Vsto 3 Snug
PPT
NNUG Certification Presentation
PDF
.net 3.5 and vs 2008
PDF
Vs 2008
PPT
Bri forum 2005 inside flex profiles - jeroen van de kamp
Office And Vsto 200
Raj Wpf Controls
Getting Started with VSTO
Developing for Office 2007 using VSTO 2005
Presentation on Visual Studio Tools for Office (VSTO) at HyderabadTechies
A developers roadmap to building professional office based solutions
Session 2: Office as a development platform with Visual Studio 2008
Better Together Cx O V1 0
Better Together Cx O V1 0
Daniel Egan Msdn Tech Days Oc Day2
VSTO + LOB Apps Information Matters
Composite Applications Speaking Tour - Lap Around Office Business Architectures
A developers roadmap to building professional office based solutions
VSTO + LOB Apps
Vsto 3 Excel Add-in SNUG
Vsto 3 Snug
NNUG Certification Presentation
.net 3.5 and vs 2008
Vs 2008
Bri forum 2005 inside flex profiles - jeroen van de kamp
Ad

More from David Truxall (9)

PDF
iOS for Android Developers (with Swift)
PDF
Consuming Web Services in Android
PPT
Day Of Dot Net Ann Arbor 2008
PPT
Visual Studio 2005 Database Professional Edition
PPT
Sql Summit Clr, Service Broker And Xml
PPT
Visual Studio 2005 New Features
PPT
ADO.Net Improvements in .Net 2.0
PPT
Windows Communication Foundation
PPT
Day Of Dot Net Ann Arbor 2007
iOS for Android Developers (with Swift)
Consuming Web Services in Android
Day Of Dot Net Ann Arbor 2008
Visual Studio 2005 Database Professional Edition
Sql Summit Clr, Service Broker And Xml
Visual Studio 2005 New Features
ADO.Net Improvements in .Net 2.0
Windows Communication Foundation
Day Of Dot Net Ann Arbor 2007

Recently uploaded (20)

PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
cuic standard and advanced reporting.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Approach and Philosophy of On baking technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Machine Learning_overview_presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
A Presentation on Artificial Intelligence
MIND Revenue Release Quarter 2 2025 Press Release
cuic standard and advanced reporting.pdf
Big Data Technologies - Introduction.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
A comparative analysis of optical character recognition models for extracting...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Encapsulation_ Review paper, used for researhc scholars
Network Security Unit 5.pdf for BCA BBA.
Approach and Philosophy of On baking technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Reach Out and Touch Someone: Haptics and Empathic Computing
Machine Learning_overview_presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Building Integrated photovoltaic BIPV_UPV.pdf
A Presentation on Artificial Intelligence

Advanced Visual Studio 2005 Tools For Office Programming And Deployment

  • 1. Advanced Visual Studio 2005 Tools for Office Programming and Deployment David Truxall Architect NuSoft Solutions
  • 2. Agenda Server programming Security Deployment
  • 3. Server Goals Make it as simple to create Office content on the server as it is for HTML Integrate with VSTO 2005 programming model Client/Server Symmetry. Scale, Scale, Scale Integrate with ASP .NET programming model
  • 4. Server Capabilities in VSTO 2005 Fill the data island on the server Program against the data on the server Run code outside the document Expose data from Office docs to ASPX
  • 5. Server Feature Read and Write Cached Data ' Load the document (does not start the Office application) Dim productsDoc As String = &quot;C:\Documents\Products0105.xls&quot; Dim doc As ServerDocument = New ServerDocument(productsDoc) 1 ' Read the cached data from the dataset in the worksheet Dim cdi As CachedDataItem cdi = doc.CachedDataManifest.Views(&quot;ProductWorksheet&quot;). _ CachedData(&quot;ProductWorksheet.ProductCache&quot;) Dim sr As System.IO.StringReader = New _ System.IO.StringReader(cdi.Xml) ProductsData.ReadXml(sr) 2 ' Write the modified dataset back to the dataset ' in the workbook. cdi.SerializeDataInstance(ProductsData) doc.Save() doc.Close() 3
  • 6. Data in Office Solutions How Does Server-Side Work? Server Code Server Client Server Side Code prepopulates elements before sending to client John is cool! $345.00 URL Request CreateExpense.aspx Databases Corporate Systems
  • 7. Data in Office Solutions How Does Server-Side Work? Server Code Server Client Document is transferred with data URL Request CreateExpense.aspx Mike is cooler! $1000.00 Databases Corporate Systems
  • 8. Filling the Data Island All the data in a VSTO 2005 enabled Office document is stored in a standard data island This enables the VSTO 2005 runtime to access the data without having to invoke Word or Excel Benefits Doesn’t require you to run Word or Excel on the server Some significant scaling issues Not supported by Microsoft
  • 9. Filling A Data Island on the Server
  • 10. What is Not Supported on the Server Program against the view Since Word & Excel aren’t running on the server there’s no way to get to the object model for each application You can work around this quite easily since you can fill the data on the server and do all the databinding/view manipulation on the client Integrate with other Office apps Since they’re not running on the server However XML/Web Services provide an ideal way to do this
  • 11. Server Summary Program against the data on the server Access any VSTO 2005 document from within an ASPX page Built to scale from day one
  • 12. .NET Security VSTO Security managed by .NET security policy Evidence (location, signature, etc.) Permissions (execution, UI, full, etc.) Since code in VSTO documents call into the Office OM (unmanaged code), we require Full Trust permission
  • 13. VSTO 2005 Security Won’t run any code by default Must trust both the document and the assembly (Full Trust) Evidence for assemblies is via Signing: Authenticode or Strong Naming Location: URL Local Machine Zone is not enough Evidence for documents is via Location E-mail attachments must be copied to desktop (Outlook temp directory is Internet Zone)
  • 14. Code Security Scenarios Alice creates a VSTO 2005 project for a Budget Spreadsheet Alice hands over final code to Bob in IT Bob deploys code & document to http://budget Bob deploys security policy to end users machine to trust http://budget Fred creates a new budget from http://budget Code runs! Fred sends it to Sue via email Sue save the budget sheet to her desktop Opens it from the desktop Code runs!
  • 15. Code Security – VeryEvil.com Evil Alice creates fakebudget.xls and creates a VSTO 2005 project Evil Alice deploys code to http://veryevil.com/budget Evil Alice sends fakebudget.xls to Bob in email Bob opens the spreadsheet No code runs because http://veryevil.com isn’t trusted
  • 16. Bad Trust Decision ISV Alice writes some VSTO 2005 code behind ISVBudget.xls Deploys code and budget to http://www.budgetsrus.com Fred creates a budget from website & saves it to his machine IT Bob discovers bug in the code behind ISVBudget.xls that compromises the corp security practices Bob tells ISV Alice but the fix won’t be ready for weeks Bob blocks access to http:// www.budgetsrus.com for the corporation Budgets don’t work but the corp security is safe Alice fixes bug Bob reinstates access to http://www.budgetsrus.com The sun shines
  • 18. Deployment & Update Self updating Document App Manifest is updated to point to the latest assembly Manifest based deployment Application level and deployment level manifests
  • 19. How Does This Work? <manifest> <deploy url= http://…/deploy.xml version=“1.0”/> <manifest> <deploy url= http://…/ deploy.xml version=“1.0.1”/> . <assembly Name=“foo.dll” updateURL= http://../1.0.1/foo.dll <manifest> <deploy url= http://…/ deploy.xml version=“1.0”/> Deploy.xml manifest.xml manifest.xml <manifest> . . curVersion-”1.0.1” Foo.xls manifest.xml Foo.dll v1.0 Foo.dll v1.0.1
  • 20. Move to Production Server <manifest> <deploy url= http://…/deploy.xml version=“1.0”/> <manifest> <deploy url= http://svr2/deploy.xml version=“1.0.1”/> . <assembly Name=“foo.dll” updateURL= http://../1.0.1/foo.dll <manifest> <deploy url= http://srv1/deploy.xml version=“1.0”/> Deploy.xml manifest.xml manifest.xml <manifest> . . curVersion-”1.0.1” <app url= “ http://srv2/ manifest.xml” Foo.xls manifest.xml Foo.dll v1.0 Foo.dll v1.0.1 Deploy.xml <manifest> . . curVersion-”1.0.1” <app url= “ http://srv2/ manifest.xml” Test Srv Production Srv
  • 21. Server Object Model to modify App Manifest CustomizedDocument doc = new CustomizedDocument (“file.doc”); doc.AppManifest.DeployManifestPath = “…<new path>” Can change any parts of the app manifest
  • 22. Why Manifests? .NET and Visual Studio moving to manifests Built using the same schema as Click Once New technology coming in the next version of .NET/VS Built into Vista Manifests provide rich information about your application Not just which dll is used Includes dependent assemblies Location of assemblies (moving to Product server)
  • 23. Deployment Basics Requirements for the target machines Office 2003 Professional or Excel 2003 Standalone or Word 2003 Standalone .NET Framework 2.0 VSTO 2005 Runtime Office PIAs referenced in your assembly Can be set to install on demand Appropriate security policies
  • 24. Local/Local Deployment Model Pros Network access is not required Users can modify and customize their documents Cons Updates to document or assembly require redistribution to each user Local/Local
  • 25. Local/Network Deployment Model Pros Eases updates to assembly Users can modify and customize their documents Cons Updates to document require redistribution to each user Local / Network
  • 26. Network/Network Deployment Model Pros Eases updates to assembly Eases updates to document Cons Users cannot modify or customize master documents Network / Network
  • 27. Conclusion Server Program against the data on the server Access any VSTO 2005 document from within an ASPX page Security Must trust document and assembly Doesn’t run by default Deployment options Document/assembly options
  • 28. © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
  • 29. *** BIND LIST *** If Not Me.EmpData Is Nothing Then Me.List1.DataSource = Me.EmpData.Tables(0) Else Me.List1.DataSource = nothing End If **** FILL DATA ISLAND **** Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating Dim da As New SqlClient.SqlDataAdapter(Me.SqlDataSource1.SelectCommand, Me.SqlDataSource1.ConnectionString) Dim empData As DataSet = New DataSet() da.Fill(empData) Dim doc As ServerDocument = New ServerDocument(Server.MapPath(&quot;EmployeeServerData.xls&quot;)) Dim hostItem As CachedDataHostItem Dim dataItem As CachedDataItem hostItem = doc.CachedData.HostItems(&quot;EmployeeServerData.Sheet1&quot;) dataItem = hostItem.CachedData(&quot;EmpData&quot;) dataItem.SerializeDataInstance(empData) doc.Save() doc.Close() End Sub