noyes vsconnections vdp351 smart client deployment with ... · agenda •clickonce overview...
TRANSCRIPT
![Page 2: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/2.jpg)
About Brian
• Principal Software Architect, IDesign Inc. (www.idesign.net) • Microsoft MVP in ASP.NET• Writing
● MSDN Magazine, asp.netPRO, Visual Studio Magazine, .NET Developer’s Journal
● Building Windows Forms Data Applications with .NET 2.0, Addison-Wesley, expected release spring 2005
• Speaking● Microsoft TechEd, Visual Studio Connections, DevEssentials, VSLive!,
INETA Speakers Bureau• Participates in Microsoft design reviews• E-mail: [email protected]• Blog: http://www.softinsight.com/bnoyes
![Page 3: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/3.jpg)
Agenda
• ClickOnce Overview• Deploying with ClickOnce• Updating Apps with ClickOnce• Elevating Security for Deployed Apps• On-Demand Updates• Under the Covers – Manifests• Wrap up
![Page 4: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/4.jpg)
What is a Smart Client?
• Rich user interface (WinForms)• Connects to back-end services• Runs securely on the client• Supports disconnected operations• Supports auto-deployment and update over the
network
![Page 5: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/5.jpg)
Smart Client Deployment Challenge
• Conflicting goals:● Richest possible user experience● Support disconnected / mobile application use● Deploy with minimal cost and effort● Keep up to date
• Deployment and Maintenance are significant costs in any distributed application life cycle
![Page 6: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/6.jpg)
ClickOnce Deployment Technology
• Microsoft® Windows Smart Client deployment technology
• Microsoft® .NET 2.0 Feature• Addresses all the previous challenges• Further enhanced in Longhorn• Goals:
● Rich client experience of a Windows-based app● Ease of deployment and update of a Web app
![Page 7: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/7.jpg)
ClickOnce Concept
• Single user action triggers deployment and execution
• Download and run from cache• Install and execute in secure sandbox • Auto detect and apply updates• Allow offline / disconnected operations
![Page 8: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/8.jpg)
Target Applications
• Line-of-Business applications● Customer Resource Management● Personnel management● Business analysis tools
• Consumer applications● Games● Multimedia apps
• Microsoft® Office Documents● Visual Studio® Tools for Office System 2003
![Page 9: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/9.jpg)
Application Requirements
• No code requirements• No class derivation• No interface implementation• Optional: On demand update code• Can even deploy Microsoft® .NET 1.X apps
![Page 10: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/10.jpg)
Architecture Requirements
• Client machine:● Must have Microsoft® .NET Framework 2.0 or later on it● Can be deployed through bootstrapper, but user must be
admin● Enhanced experience in Longhorn
• Server:● No .NET required● Can be any web or file server● Place the files + manifests in a folder
![Page 11: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/11.jpg)
ClickOnce Bootstrapper
• Installs prerequisites on the client● .NET Framework● MDAC● Windows Installer● Custom Requirements
• Requires Admin privilege• Separate install URL
![Page 12: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/12.jpg)
ClickOnce vs. MSI
• Not a replacement for Microsoft® Windows®Installer (MSI)● Complements for Smart Client scenarios
• Still may need Windows Installer for many apps
![Page 13: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/13.jpg)
Agenda
• ClickOnce Overview• Deploying with ClickOnce• Updating Apps with ClickOnce• Elevating Security for Deployed Apps• On-Demand Updates• Under the Covers – Manifests• Wrap up
![Page 14: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/14.jpg)
Deployment Models
• “Launched”● Available online only● App files cached under user profile for speedy
launch •C:\Documents and Settings\<user>\Local Settings\Apps
![Page 15: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/15.jpg)
Deployment Models
• “Installed”● Available online or offline● Files cached under user profile on local machine● Start menu item for subsequent launch● Add/Remove Programs item added
![Page 16: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/16.jpg)
Agenda
• ClickOnce Overview• Deploying with ClickOnce• Updating Apps with ClickOnce• Elevating Security for Deployed Apps• On-Demand Updates• Under the Covers – Manifests• Wrap up
![Page 17: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/17.jpg)
Update options
• Launched apps● Always check for new versions and download before running
• Installed apps● Check for updates● Optional / Required● Check before run / background while running● Check every time / every XX interval● Check for updates at location XX● On-demand with API
![Page 18: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/18.jpg)
ClickOnce in Action
Client
File or Web Server
App / Web / DBserver
<soap><foo>
…
DB
xxxxxxxxx
1.0
1.0
Launch App
2.0
xxxxxxxxx
2.0
BLL
![Page 19: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/19.jpg)
Scaling Out with ClickOnce
Client
File or Web Server
App / Web / DBserver
<soap><foo>
…
DB
xxxxxxxxx
1.0
Launch App
BLL
![Page 20: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/20.jpg)
Demo #1
ClickOnce Deployment and Update
![Page 21: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/21.jpg)
Agenda
• ClickOnce Overview• Deploying with ClickOnce• Updating Apps with ClickOnce• Elevating Security for Deployed Apps• On-Demand Updates• Under the Covers – Manifests• Wrap up
![Page 22: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/22.jpg)
Security Features
• Zero-impact installation● Files cached under user profile● Cannot touch shared resources on machine
• Code Access Security sandbox execution● Based on origin of files (deployment server)● Can elevate permissions through user prompting● Can elevate permissions automatically through trusted
publisher
• XML Signature● Signed manifests to ensure authentication and integrity
![Page 23: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/23.jpg)
Demo #2
Elevating Security Permissions
![Page 24: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/24.jpg)
Agenda
• ClickOnce Overview• Deploying with ClickOnce• Updating Apps with ClickOnce• Elevating Security for Deployed Apps• On-Demand Updates• Under the Covers – Manifests• Wrap up
![Page 25: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/25.jpg)
On Demand Updates
• System.Deployment namespace● ApplicationUpdaterService class
•CheckForUpdates•Update•Application.Restart•Async versions available
![Page 26: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/26.jpg)
Demo #3
On Demand Updates
![Page 27: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/27.jpg)
Agenda
• ClickOnce Overview• Deploying with ClickOnce• Updating Apps with ClickOnce• Elevating Security for Deployed Apps• On-Demand Updates• Under the Covers – Manifests• Wrap up
![Page 28: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/28.jpg)
Manifest Files
• Deployment manifest● Describe deployment model and update policy● Point to application manifest● Digital signature
• Application manifest● Describe application● Identify application files and dependencies● Declare security permission requirements● Digital signature
![Page 29: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/29.jpg)
Demo #4
Behind the Scenes
![Page 30: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/30.jpg)
Agenda
• ClickOnce Overview• Deploying with ClickOnce• Updating Apps with ClickOnce• Elevating Security for Deployed Apps• On-Demand Updates• Under the Covers – Manifests• Wrap up
![Page 31: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/31.jpg)
Visual Studio Tools
• Debug in Zone● Run in specified context to simulate deployed
environment
• Permissions Calculator● Analyze your code and tell you exactly what
permissions it requires
![Page 32: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/32.jpg)
ClickOnce Enhancements in Longhorn
• Background Intelligent Transfer Service (BITS) download
• Secure Execution Environment● More tightly integrated with the OS● Options to run within IE context or as standalone
app
• Windows Shell Integration• More to follow?
![Page 33: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/33.jpg)
What Can You Do Today?
• No Touch Deployment● Like a launched ClickOnce application● Must configure security on user machine● Can use local machine bootstrap app to circumvent
security
• Updater Application Block● Automatic checking for available updates● Download and apply● Have to write a little code + reference the block
![Page 34: Noyes VSConnections VDP351 Smart Client Deployment with ... · Agenda •ClickOnce Overview •Deploying with ClickOnce •Updating Apps with ClickOnce •Elevating Security for Deployed](https://reader030.vdocuments.us/reader030/viewer/2022040918/5e933a4c9d3e304185635844/html5/thumbnails/34.jpg)
Resources
• Trustworthy Smart Client Deployment with ClickOnce, Brian Noyes, MSDN Magazine, May 2004. http://www.msdn.microsoft.com/msdnmag/issues/04/05/ClickOnce/default.aspx
• .NET Rocks! interview: http://www.franklins.net/fnetdotnetrocks/dotnetrocks.aspx?showid=48
• Updater Application Block: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/updater.asp
• No Touch Deployment: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchno-touchdeploymentinnetframework.asp
EE--mailmail: : [email protected]@idesign.netBlogBlog: : http://www.softinsight.com/bnoyeshttp://www.softinsight.com/bnoyes