1 / 30

ClickOnce: Advanced Topics in Web Based Application Deployment for Windows Forms and Avalon

Session code: CLI400. ClickOnce: Advanced Topics in Web Based Application Deployment for Windows Forms and Avalon. Jamie Cool Program Manager Microsoft Corporation. Agenda. ClickOnce Programmability Updating API On-Demand API ClickOnce Architecture Tips & Tricks Coming Soon!.

pomona
Download Presentation

ClickOnce: Advanced Topics in Web Based Application Deployment for Windows Forms and Avalon

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Session code:CLI400 ClickOnce: Advanced Topics in Web Based Application Deployment for Windows Forms and Avalon Jamie Cool Program Manager Microsoft Corporation

  2. Agenda • ClickOnce Programmability • Updating API • On-Demand API • ClickOnce Architecture • Tips & Tricks • Coming Soon!

  3. ClickOnce Programmability

  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

  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

  6. Updating API Demo NameTitle Group

  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

  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 1st start • DownloadFiles() • Takes a group or file name • Sync & Async – multiple downloads simul.

  9. On-Demand API Demo NameTitle Group

  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

  11. ClickOnce Architecture

  12. ClickOnce – Whidbey Arch Network System. Deployment.exe (managed) IE App Store MIME Filter Net Access (NCL) UI (Winforms) File Access (BCL) My App Yes Startup SHIM Update Check? No

  13. ClickOnce – Longhorn Arch Network BITS 2.0 My App (Browser Hosted) IE App Store System. Deploy.exe System. Deployment.dll (managed) My App Startup SHIM Jobs.NET Service

  14. Deployment Manifest MyApp.Deploy <assemblyIdentity name="TaskVision.deploy" version="1.0.0.0" publicKeyToken=“…" processorArchitecture="x86" asmv2:culture="en-US" /> <description asmv2:publisher="Microsoft" asmv2:product="TaskVision"> </description> Identity

  15. Deployment Manifest MyApp.Deploy <deployment isRequiredUpdate="false" > <install shellVisible="true" /> <subscription> <update> <beforeApplicationStartup /> <periodic> <minElapsedTimeAllowed time="0" unit="hours" /> </periodic> </update> </subscription> </deployment> Identity Deployment

  16. Deployment Manifest MyApp.Deploy <dependency> <dependentAssembly> <assemblyIdentity name="TaskVision.manifest" version="1.0.0.0" publicKeyToken=“…" processorArchitecture="x86" asmv2:culture="en-US" /> </dependentAssembly> <asmv2:installFrom codebase="1.0.0.0/TV.manifest" /> </dependency> Identity Deployment App Ref

  17. Deployment Manifest MyApp.Deploy <Signature > <SignedInfo> <Reference URI=""> <DigestMethod Algorithm=“http://…" /> <DigestValue>2xKk…</DigestValue> </Reference> </SignedInfo> <SignatureValue>vNTBod96H7k…</SignatureValue> <KeyInfo> <KeyValue> <RSAKeyValue> <Modulus>+Wnh5RN9…</Modulus> <Exponent>AQAB</Exponent> </RSAKeyValue> </KeyValue> </KeyInfo> </Signature> Identity Deployment App Ref Signature

  18. Application Manifest MyApp.Manifest <assemblyIdentity name="TaskVision.deploy" version="1.0.0.0" publicKeyToken=“…" processorArchitecture="x86" asmv2:culture="en-US" /> Identity Entry Point Security File List Assembly List Signature

  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!

  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

  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

  22. Tips & Tricks

  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

  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

  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…

  26. Other Sessions…

  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?

  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.

  29. Deployment Manifest MyApp.Deploy <dependency> <dependentAssembly> <assemblyIdentity name="TaskVision.manifest" version="1.0.0.0" publicKeyToken=“…" processorArchitecture="x86" asmv2:culture="en-US" /> </dependentAssembly> <asmv2:installFrom codebase="1.0.0.0/TV.manifest" /> </dependency> <assemblyIdentity name="TaskVision.deploy" version="1.0.0.0" publicKeyToken=“…" processorArchitecture="x86" asmv2:culture="en-US" /> <description asmv2:publisher="Microsoft" asmv2:product="TaskVision"> </description> <deployment isRequiredUpdate="false" > <install shellVisible="true" /> <subscription> <update> <beforeApplicationStartup /> <periodic> <minElapsedTimeAllowed time="0" unit="hours" /> </periodic> </update> </subscription> </deployment> Identity Deployment App Ref Signature

More Related