Session code CLI 400 Click Once Advanced Topics






























- Slides: 30
Session code: CLI 400 Click. Once: Advanced Topics in Web Based Application Deployment for Windows Forms and Avalon Jamie Cool Program Manager Microsoft Corporation 1
Agenda Click. Once Programmability Updating API On-Demand API Click. Once Architecture Tips & Tricks Coming Soon! 2
Click. Once Programmability 3
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 4
API Basics System. Deployment Namespace Simple & Secure to use API Ex. Check. For. Update() & Update() Sync & Async versions of all methods Moving to “Async For Components” model Only work when deployed w/ Click. Once Use Is. Network. Deployed to detect 5
Updating API Demo Name Title Group 6
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 7
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 Download. Files() Takes a group or file name Sync & Async – multiple downloads simul. 8
On-Demand API Demo Name Title Group 9
APIs in the Alpha Currently in System. Deployment. Framework Moving to -> System. Deployment Currently uses IAsync. Result 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 10
Click. Once Architecture 11
Click. Once – Whidbey Arch Network IE MIME Filter System. Deployment. exe (managed) Net Access (NCL) App Store UI (Winforms) File Access (BCL) Yes My App Startup SHIM Update Check? No 12
Click. Once – Longhorn Arch Network IE My App (Browser Hosted) BITS 2. 0 App Store System. Deployment. dll (managed) Startup SHIM My App System. Deploy. exe Jobs. NET Service 13
Deployment Manifest My. App. Deploy Identity <assembly. Identity name="Task. Vision. deploy" version="1. 0. 0. 0" public. Key. Token=“…" processor. Architecture="x 86" asmv 2: culture="en-US" /> <description asmv 2: publisher="Microsoft" asmv 2: product="Task. Vision"> </description> 14
Deployment Manifest My. App. Deploy Identity Deployment <deployment is. Required. Update="false" > <install shell. Visible="true" /> <subscription> <update> <before. Application. Startup /> <periodic> <min. Elapsed. Time. Allowed time="0" unit="hours" /> </periodic> </update> </subscription> </deployment> 15
Deployment Manifest My. App. Deploy Identity Deployment App Ref <dependency> <dependent. Assembly> <assembly. Identity name="Task. Vision. manifest" version="1. 0. 0. 0" public. Key. Token=“…" processor. Architecture="x 86" asmv 2: culture="en-US" /> </dependent. Assembly> <asmv 2: install. From codebase="1. 0. 0. 0/TV. manifest" /> </dependency> 16
Deployment Manifest My. App. Deploy Identity Deployment <Signature > <Signed. Info> <Reference URI=""> <Digest. Method Algorithm=“http: //…" /> <Digest. Value>2 x. Kk…</Digest. Value> </Reference> </Signed. Info> <Signature. Value>v. NTBod 96 H 7 k…</Signature. Value> App Ref Signature <Key. Info> <Key. Value> <RSAKey. Value> <Modulus>+Wnh 5 RN 9…</Modulus> <Exponent>AQAB</Exponent> </RSAKey. Value> </Key. Info> </Signature> 17
Application Manifest My. App. Manifest Identity Entry Point <assembly. Identity name="Task. Vision. deploy" version="1. 0. 0. 0" public. Key. Token=“…" processor. Architecture="x 86" asmv 2: culture="en-US" /> Security File List Assembly List Signature 18
Manifest Signing Click. Once 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! 19
CLR Security Infrastructure Application. Security. Manager (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 Trust. Manager for decision Only if no existing decision is present Different Trust. Manager for Longhorn OS 20
Trust. Manager Decides if app needs additional trust Requested permissions beyond default No previous trusted version No admin policy Display user prompt if necessary ITrust. Manager. Config Control when / how prompting happens 21
Tips & Tricks 22
Tips & Tricks Using Windows 2003 as the server Locks down unknown file extensions Must enable in MIME type list Default Click. Once 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 23
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 24
Things to look for soon… Compression support Based on HTTP compression On-Demand APIs Install. Shield support for Click. Once More VS semi-trust development support VS Signing support SDK Manifest editor Improved Logging… 25
Other Sessions… 26
Call to Action Use Click. Once! You already have it! Post feedback to: <> What do you like? What’s missing? What did you have problems with? 27
© 2003 -2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 28
29
Deployment Manifest My. App. Deploy Identity Deployment App Ref Signature <dependency> <assembly. Identity <deployment is. Required. Update="false" > name="Task. Vision. deploy" <dependent. Assembly> version="1. 0. 0. 0" <install shell. Visible="true" /> <assembly. Identity public. Key. Token=“…" name="Task. Vision. manifest" processor. Architecture="x 86" <subscription> version="1. 0. 0. 0" /> asmv 2: culture="en-US" <update> public. Key. Token=“…" /> <before. Application. Startup processor. Architecture="x 86" <description <periodic> asmv 2: culture="en-US" /> asmv 2: publisher="Microsoft" <min. Elapsed. Time. Allowed </dependent. Assembly> asmv 2: product="Task. Vision"> time="0" unit="hours" /> </description> </periodic> <asmv 2: install. From </update> codebase="1. 0. 0. 0/TV. manifest" /> </subscription> </dependency> </deployment> 30