410 likes | 705 Views
2. Agenda. What is ?ClickOnce"?ClickOnce Basics Demo: ClickOnce Publishing Smart Client Windows ApplicationsFine-tuning ClickOnceDemo: Configuring ClickOnce DeploymentRequirements and updatingDemo: Updating ClickOnce Deployed ApplicationPrerequisites and ManifestsDemo: PrerequisitesSecuri
E N D
1. Introduction to ClickOnce
Name: Panayiotis Panayiotou
Title: Business Solutions Lead – Dot.Cy Developments Ltd
2. 2 Agenda What is “ClickOnce”?
ClickOnce Basics
Demo: ClickOnce Publishing Smart Client Windows Applications
Fine-tuning ClickOnce
Demo: Configuring ClickOnce Deployment
Requirements and updating
Demo: Updating ClickOnce Deployed Application
Prerequisites and Manifests
Demo: Prerequisites
Security
Demo: Security SandBox
ClickOnce API
Demo: ClickOnce API
Hints & Tips
3. 3
4. 4 ClickOnce Vision What is “ClickOnce”? Bring the ease of
web application deployment to
client applications
5. 5 Deployment with ClickOnce What is “ClickOnce”? Smart Client Deploy meets Web Deploy
Run an application by clicking on a URL
Update an application by updating a server
Robust Downloader & Installer
File & HTTP server support
Flexible updates – optional, required, etc..
Start Menu & Add/Remove Programs integration
Extensibility via an API
Deep Visual Studio Integration
Rich Security Model
CLR CAS sandboxing
Permission elevation prompting w/ Authenticode
6. 6 The Best of the Client and WebWhat is “ClickOnce”? With no-touch deployment, Windows Forms applications — desktop applications built using the Windows Forms classes of the .NET Framework — can be downloaded, installed, and run directly on the users' machines without any alteration of the registry or shared system components.
With no-touch deployment, Windows Forms applications — desktop applications built using the Windows Forms classes of the .NET Framework — can be downloaded, installed, and run directly on the users' machines without any alteration of the registry or shared system components.
7. Hope Everyone is still awaked!!!!!!!! Demo: ClickOnce Publishing Smart Client Windows Applications
8. 8 Fine-tuning ClickOnceDevelopment Experience Visual Studio 2005 IDE support
Integrated with core project types
Setup is not a post-development task
Project Designer
Publish pane
Security pane
Singing pane
Publish Wizard
Copies application to Web server, FTP or network file share
9. 9 Fine-tuning ClickOnce Deployment Options ‘Launched’ application (from Web or UNC)
Application launches, but doesn’t “install”
No start menu, no Add/Remove Programs
There will besupport to cleanupClickOnce Cache
Always updateson launch
10. 10 .NET Framework Deployment Managed Networks
Desktops locked down
Push technologies
SMS, Intellimirror, Imaging
Unmanaged PCs
User is the admin
Component Bootstrapper
FX installed as part of app setup
11. 11 Component Bootstrapper Lightweight setup.exe
Detects prerequisites
Downloads/installs as needed
Web or disk installations
Manages reboots
Supports any msi or exe installer
Out of the box
.NET FX, MDAC 9, MSDE, J#, & MSI 2.0, SQLEXPRESS
Fully extensible for other components
12. 12 Bootstrapper in action
13. Demo: Configuring ClickOnce Deployment
14. 14 ClickOnce Requirements Operating System Support
“ClickOnce” ships in the .NET Framework redist & supports all of the same operating systems & languages as the core .NET Framework. Specifically Windows 98 & up, except for NT4.
Special server requirements for hosting a "ClickOnce" application
No, you can use a regular file share, IIS or any web server.
If you are using a web server
You need to configure the MIME type (application/deployment) for the .application extension.
You need to configure your server to unblock any restricted file extensions used by your app, such as .exe, .dll, .config., manifest, etc.
If you want to use HTTP compression, you will need IIS6 and HTTP 1.1.
Client Computers to have .NET FW 2.0
15. 15 ClickOnce BasicsUpdate options for installed apps On application startup
If found, ask user to update app
After application startup
If found, ask user to update on next run
Required updates
Specified using minimum required version
Programmatic updating
Prerequisites
16. 16 ClickOnce BasicsUpdate Architecture
17. Demo: Updating ClickOnce Deployed Application
18. 18 ManifestsDeclarative Installation Application manifest (n)
Authored by the developer
Describes the application
Example: what assemblies constitute the application
Deployment manifest (1)
Authored by the administrator
Describes the application deployment
Example: what version clients should use
19. 19 ManifestsDeployment & Application Manifests
20. 20 ManifestsDeployment Manifest
21. 21 ManifestsDeployment Manifest
22. 22 ManifestsDeployment Manifest
23. 23 ManifestsDeployment Manifest
24. 24 ManifestsApplication Manifest
25. 25 ManifestsApplication Manifest
26. 26 ManifestsApplication Manifest
27. 27 ManifestsApplication Manifest
28. 28 ManifestsApplication Manifest
29. 29 ClickOnce BasicsBootstrapper Installs app prerequisites
.NET FX, SQLExpress, DirectX,..
Requires admin rights
Extensible architecture
Manages reboots
Installs ClickOnce appafter prerequisites
Use ClickOnce for auto-updates
No auto-updating of prerequisite components
30. Demo: Prerequisites
31. 31 SecurityIntroduction ClickOnce applications run in a sandbox by default
Permissions are based on origin
Internet, Intranet or Full Trust
Similar to IE and Javascript
Sandbox size increases
“Longhorn” > .NET V2.0 > .NET V1.1
Apps often need higher trust
Call unmanaged code
Connect to DB, WS, …
32. 32 SecurityDetermining required permissions Security pane of Project Designer
Configure permissions manually
Permissions Calculator
Calculates least required permissions
Use declarative securityfor dynamic actionsEx. [WebBrowserPermission( SecurityAction.Demand, Unrestricted = true, Level = WebBrowserPermissionLevel.Default)]
Debug in sandbox
Intellisense in sandbox
33. 33 SecurityMicrosoft Authenticode Authenticode signatures required for ClickOnce
Based on industry standards
Allows devs to include company information through the use of digital signatures
In contrast to.snk files!
Certificate origins
Verisign, …
Internal certification authority (CA)
MakeCert
Programs
MakeCert: creates X.509 certificate
SignCode, CertMgr, …
MSDN link
34. 34 SecurityUser prompting App requests requiredpermissions
User prompted,if app permission needs > sandbox permissions
Users make trust decisions all the time
Installing software from CD
Submitting a credit card number to web page
Useful for targeting “PCs at home”
Internet or unmanaged Intranet
User is the admin
Admin can disable prompting via policy
35. 35 SecurityScenarios to get elevated trust ISVs
Obtain a cert from VeriSign
User runs app ? trust prompt indicates the company
Large managed companies (no trust prompt)
Can use own PKI infrastructure and issue certs for internal enterprise applications
Add cert to trusted root & publisher list
? Use Active Directory & Group Policy
Small companies & hobbyists (no trust prompt)
Use makeCert (.NET SDK) or VS2005
Add cert to trusted root & publisher list on clients
At setup time of .NET FW, SMS, etc.
Tell enduser to use CertMgr
? As part of the bootstrapper makecert -sk XYZ -n "CN=XYZ Company" testXYZ.cer makecert -sk XYZ -n "CN=XYZ Company" testXYZ.cer
36. 36 SecuritySecure Updates ClickOnce manifests are signed (XMLDSig)
Manifest hashed
Hash signed & signature created
Signature added to manifest
? Changing the manifest invalidates the signature
? Guarantees a unique application identity
Publisher key needed to deploy updates
ClickOnce apps are isolated ? their components can’t be reused!
Prevents auto-deployment of viruses
Does not require signed assemblies
Hash in signed manifest is sufficient
37. Demo: Security
38. 38 API BasicsIntroduction System.Deployment Namespace
Class ApplicationDeployment
Simple & Secure to use API
Ex. CheckForUpdate(), UpdateLocation& Update()
Sync & Async versions of all methods
Only works when deployed with ClickOnce
Use IsNetworkDeployed to detect
39. 39 API BasicsProgramming Scenarios Application updating
Implement “Update now” menu option
Match client with back-end programs
Customize when-to-update logic
Limit updates to beta users only
Throttle updates based on server load
40. Demo: ClickOnce API
41. 41 Some Afterthoughts Keep smart client applications as much as possible self-dependable to keep security restrictions to the minimum
Compatibility with previous versions of .NET framework
Can us a wrapper application
Deploying with page login
No direct support from ClickOnce API. But you can use the ASP.NET authentication and authorization mechanisms.
42. 42