Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005.

Similar presentations


Presentation on theme: "Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005."— Presentation transcript:

1 Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005

2 Advanced Visual Studio 2005 Tools for Office Programming and Deployment Paul Foster Developer Evangelist Microsoft

3 Agenda Server programming Security Deployment

4 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

5 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

6 ServerCode Server Client Databases CorporateSystems Server Side Code prepopulates elements before sending to client John is cool! $345.00 URL Request CreateExpense.aspx Data in Office Solutions How Does Server-Side Work?

7 ServerCode Server Client Databases CorporateSystems Server Side Code prepopulates elements before sending to client URL Request CreateExpense.aspx Mike is cooler! $1000.00

8 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 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 2 ' Write the modified dataset back to the dataset ' in the workbook. cdi.SerializeDataInstance(ProductsData) doc.Save() doc.Close() 3 3

9 Server Programming

10 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

11 What is Not Supported on the Server Program against the view/host api 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

12 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

13 VSTO Security

14 VSTO 2005 Security Won’t run any code by default Utilises.NET Code Access Security 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)

15 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://budgethttp://budget Bob deploys security policy to end users machine to trust http://budget http://budget Fred creates a new budget from http://budgethttp://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!

16 Code Security – VeryEvil.com Evil Alice creates fakebudget.xls and creates a VSTO 2005 project Evil Alice deploys code to http://veryevil.com/budget 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 trustedhttp://veryevil.com

17 Bad Trust Decision ISV Alice writes some VSTO 2005 code behind ISVBudget.xls Deploys code and budget to http://www.budgetsrus.comhttp://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 corporationhttp://www.budgetsrus.com Budgets don’t work but the corp security is safe Alice fixes bug Bob reinstates access to http://www.budgetsrus.comhttp://www.budgetsrus.com The sun shines

18 Deployment

19 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

20 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 Longhorn Manifests provide rich information about your application Not just which dll is used Includes dependent assemblies Location of assemblies (moving to Product server)

21 Update Manifest based deployment Application level and deployment level manifests Self updating Document App Manifest is updated to point to the latest assembly

22 How Does This Work? <deploy url=http://…/deploy.xmlhttp://…/deploy.xml version=“1.0”/> <deploy url=http://…/deploy.xmlhttp://…/deploy.xml version=“1.0.1”/>. <assembly Name=“foo.dll” updateURL= http://../1.0.1/foo.dll <deploy url=http://…/deploy.xmlhttp://…/deploy.xml version=“1.0”/> Deploy.xml manifest.xml. curVersion-”1.0.1” Foo.xls manifest.xml Foo.dll v1.0 Foo.dll v1.0.1

23 Move to Production server <deploy url=http://…/deploy.xmlhttp://…/deploy.xml version=“1.0”/> <deploy url= http://svr2/deploy.xml version=“1.0.1”/>. <assembly Name=“foo.dll” updateURL= http://../1.0.1/foo.dll <deploy url= http://srv1/deploy.xml version=“1.0”/> Deploy.xml manifest.xml. 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. curVersion-”1.0.1” <app url= “http://srv2/ manifest.xml” Test Srv Production Srv

24 Server OM to modify App Manifest Can change any part of the app manifest CustomizedDocument doc = new CustomizedDocument (“file.doc”); doc.AppManifest.DeployManifestPath = “… ”;

25 Accessing the AppManifest

26 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

27 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

28 Network/Network Deployment Model Pros Eases updates to assembly Eases updates to document Cons Users cannot modify or customize master documents Network / Network

29 Offline Access Local install (e.g. Program Files) Guaranteed Offline experience Need to run setup first – if you open a document without having installed the relevant application into program files then it won’t work Servicing – MSI is a double edged sword Intellimirror Guaranteed Offline experience Allows you to push new versions to clients without client having to do anything Need to synchronize before the first offline access IE Cache Allows you to push new versions to clients without client having to do anything Need to synchronize before the first offline access Cache is transitory Referenced dll’s in a customization are delay loaded

30 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

31 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Download ppt "Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005."

Similar presentations


Ads by Google