Download presentation
Presentation is loading. Please wait.
Published byPercival Thomas Modified over 9 years ago
1
1 ClickOnce: Advanced Topics in Web Based Application Deployment for Windows Forms and Avalon Jamie Cool Program Manager Microsoft Corporation Jamie Cool Program Manager Microsoft Corporation Session code: CLI400
2
2 Agenda ClickOnce Programmability Updating API On-Demand API ClickOnce Architecture Tips & Tricks Coming Soon! ClickOnce Programmability Updating API On-Demand API ClickOnce Architecture Tips & Tricks Coming Soon!
3
3 ClickOnce Programmability
4
4 Updating API Scenarios “Update Now” menu option Ensuring server backend & client frontend match Custom “when to update” logic Early adopter “only” updates Throttled updates based on server load “Update Now” menu option Ensuring server backend & client frontend match Custom “when to update” logic Early adopter “only” updates Throttled updates based on server load
5
5 API Basics System.Deployment Namespace Simple & Secure to use API Ex. CheckForUpdate() & Update() Sync & Async versions of all methods Moving to “Async For Components” model Only work when deployed w/ ClickOnce Use IsNetworkDeployed to detect System.Deployment Namespace Simple & Secure to use API Ex. CheckForUpdate() & Update() Sync & Async versions of all methods Moving to “Async For Components” model Only work when deployed w/ ClickOnce Use IsNetworkDeployed to detect
6
6 Updating API Demo Name Title Group Name Title Group
7
7 On-Demand API Scenarios “Progressive download” Download an app as it’s needed Shell w/ Plugin app model Generic shell hosts all company apps Each app not downloaded until used Each user may use different apps “Progressive download” Download an app as it’s needed Shell w/ Plugin app model Generic shell hosts all company apps Each app not downloaded until used Each user may use different apps
8
8 Using On-Demand Group files in the manifest Put related files in the same group Download files as a group Mark files as “optional” in the manifest Optional files are not downloaded at 1 st start DownloadFiles() Takes a group or file name Sync & Async – multiple downloads simul. Group files in the manifest Put related files in the same group Download files as a group Mark files as “optional” in the manifest Optional files are not downloaded at 1 st start DownloadFiles() Takes a group or file name Sync & Async – multiple downloads simul.
9
9 On-Demand API Demo Name Title Group Name Title Group
10
10 APIs in the Alpha Currently in System.DeploymentFramework Moving to -> System.Deployment Currently uses IAsyncResult model Moving to -> “Async for Components” model Easier programming model Currently has no On-Demand support It’s being added! API shape is being tweaked based on feedback Currently in System.DeploymentFramework Moving to -> System.Deployment Currently uses IAsyncResult model Moving to -> “Async for Components” model Easier programming model Currently has no On-Demand support It’s being added! API shape is being tweaked based on feedback
11
11 ClickOnce Architecture
12
12 ClickOnce – Whidbey Arch IE MIME Filter Startup SHIM My App Update Check? UI (Winforms) Net Access (NCL) Network App Store System. Deployment.exe (managed) File Access (BCL) Yes No
13
13 ClickOnce – Longhorn Arch Startup SHIM My App Network App Store System. Deployment.dll (managed) IE My App (Browser Hosted) BITS 2.0 Jobs.NET Service System. Deploy.exe
14
14 Deployment Manifest Identity <assemblyIdentity name="TaskVision.deploy" version="1.0.0.0" publicKeyToken=“…" processorArchitecture="x86" asmv2:culture="en-US" /> <description asmv2:publisher="Microsoft" asmv2:product="TaskVision"> MyApp.Deploy
15
15 Deployment Manifest Identity Deployment <minElapsedTimeAllowed time="0" unit="hours" /> MyApp.Deploy
16
16 Deployment Manifest Identity Deployment App Ref <assemblyIdentity name="TaskVision.manifest" version="1.0.0.0" publicKeyToken=“…" processorArchitecture="x86" asmv2:culture="en-US" /> <asmv2:installFrom codebase="1.0.0.0/TV.manifest" /> MyApp.Deploy
17
17 Deployment Manifest Identity Deployment App Ref Signature MyApp.Deploy 2xKk… vNTBod96H7k… +Wnh5RN9… AQAB
18
18 Application Manifest Identity Entry Point Security File List Assembly List MyApp.Manifest Signature <assemblyIdentity name="TaskVision.deploy" version="1.0.0.0" publicKeyToken=“…" processorArchitecture="x86" asmv2:culture="en-US" />
19
19 Manifest Signing ClickOnce will required signed manifests Guarantees update integrity Can sign with public key or cert Uses XML DSIG Will not require signed assemblies Hash in manifest is sufficient Tools will help w/ signing VS will support automatic signing SDK tool will also be provided Signing is Optional in Alpha It won’t be in the Beta! ClickOnce will required signed manifests Guarantees update integrity Can sign with public key or cert Uses XML DSIG Will not require signed assemblies Hash in manifest is sufficient Tools will help w/ signing VS will support automatic signing SDK tool will also be provided Signing is Optional in Alpha It won’t be in the Beta!
20
20 CLR Security Infrastructure ApplicationSecurityManager (ASM) New CLR Codegroup Grants trust based using Application evidence Checks application trust lists Per-user & per-machine lists Stores trust or no-trust decision Trust granted based on trust requested Delegates to TrustManager for decision Only if no existing decision is present Different TrustManager for Longhorn OS ApplicationSecurityManager (ASM) New CLR Codegroup Grants trust based using Application evidence Checks application trust lists Per-user & per-machine lists Stores trust or no-trust decision Trust granted based on trust requested Delegates to TrustManager for decision Only if no existing decision is present Different TrustManager for Longhorn OS
21
21 TrustManager Decides if app needs additional trust Requested permissions beyond default No previous trusted version No admin policy Display user prompt if necessary ITrustManagerConfig Control when / how prompting happens Decides if app needs additional trust Requested permissions beyond default No previous trusted version No admin policy Display user prompt if necessary ITrustManagerConfig Control when / how prompting happens
22
22 Tips & Tricks
23
23 Tips & Tricks Using Windows 2003 as the server Locks down unknown file extensions Must enable in MIME type list Default ClickOnce file extensions being added Always restart IE between updates Caching issue causes some updates to be delayed on Alpha Can also configure web server to expire content after 1 minute Using Windows 2003 as the server Locks down unknown file extensions Must enable in MIME type list Default ClickOnce file extensions being added Always restart IE between updates Caching issue causes some updates to be delayed on Alpha Can also configure web server to expire content after 1 minute
24
24 Tips & Tricks (cont.) Deployment errors Debug using the clickonce error log HTTP error -> make sure you can download all app files using IE Invalid manifest error ->make sure the manifest schema is valid Runtime errrors Make sure your running with needed trust Usually manifests as a security exception Deployment errors Debug using the clickonce error log HTTP error -> make sure you can download all app files using IE Invalid manifest error ->make sure the manifest schema is valid Runtime errrors Make sure your running with needed trust Usually manifests as a security exception
25
25 Things to look for soon… Compression support Based on HTTP compression On-Demand APIs InstallShield support for ClickOnce More VS semi-trust development support VS Signing support SDK Manifest editor Improved Logging… Compression support Based on HTTP compression On-Demand APIs InstallShield support for ClickOnce More VS semi-trust development support VS Signing support SDK Manifest editor Improved Logging…
26
26 Other Sessions…
27
27 Call to Action Use ClickOnce! You already have it! Post feedback to: <> What do you like? What’s missing? What did you have problems with? Use ClickOnce! You already have it! Post feedback to: <> What do you like? What’s missing? What did you have problems with?
28
28 © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
30
30 Deployment Manifest Identity <assemblyIdentity name="TaskVision.deploy" version="1.0.0.0" publicKeyToken=“…" processorArchitecture="x86" asmv2:culture="en-US" /> <description asmv2:publisher="Microsoft" asmv2:product="TaskVision"> Deployment App Ref Signature <assemblyIdentity name="TaskVision.manifest" version="1.0.0.0" publicKeyToken=“…" processorArchitecture="x86" asmv2:culture="en-US" /> <asmv2:installFrom codebase="1.0.0.0/TV.manifest" /> <minElapsedTimeAllowed time="0" unit="hours" /> MyApp.Deploy
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.