• No results found

Deploying Applications with ClickOnce

N/A
N/A
Protected

Academic year: 2021

Share "Deploying Applications with ClickOnce"

Copied!
25
0
0

Loading.... (view fulltext now)

Full text

(1)

Deploying Applications with

ClickOnce

Suthep Sangvirotjanaphat

Microsoft MVP, GreatFriends.Biz Instructor [email protected]

http://GreatFriends.Biz

Thailand .NET Training and Community

Suthep Sangvirotjanaphat

Microsoft MVP, GreatFriends.Biz Instructor [email protected]

http://GreatFriends.Biz

(2)

Agenda

Introduction

ClickOnce Basics

Security

(3)

Introduction

Deployment Problems

Client applications can be fragile

Will the installation of one application break another application?

Traditional DLL-conflict problem

Installing client applications is hard and

expensive

Must affect every client

For both the initial installation and updates

Web-based applications

Solved many deployment issues, but there’s a “but" At the expense of a rich client experience

(4)

Introduction

Version 1.0 of the .NET Framework

Addressed the issue of DLL conflict

Introduced application isolation

Controlled the versioning of shared components

Began to address the ease-of-deployment issue

Run executable files from URL or UNC HREF executable files

(5)

Introduction

The Best of the Client and the Web

Per-Computer and Shared Components

Install and Run per User

Windows Shell Integration

Low System Impact

“No Touch” Deployment

Unrestricted Installation Offline Access

Rich and Interactive

Reach MSI Client ClickOnce Web

(6)

ClickOnce Basics

Development Experience

IDE support in Visual Studio 2005

Integrated with core project types

Setup is not a post-development task

Project Designer

Publish pane

Security pane

Publish Wizard

Copies the application to a Web server

Server extensions through Microsoft FrontPage®

(7)

ClickOnce Basics

Declarative Installation

Application manifest

Authored by the developer Describes the application

Example: which assemblies constitute the application

Deployment manifest

Authored by the administrator

Describes the application deployment

(8)

Web Page Link to Manifest Deployment Manifest 1.0 1.1

1.0

Application Manifest

1.1

Application Manifest

ClickOnce Basics

(9)

ClickOnce Basics

Deployment Options

Launched applications

Application launches but doesn’t install

No Start menu and no Add or Remove Programs Always updates on launch

Installed applications

Install from the Web, a UNC location, or a CD-ROM Start menu and Add or Remove Programs

(10)

ClickOnce Basics

Update Architecture

Yes No Application Store Installed Update Check? Startup SHIM My Application Deployment Framework Service MIME .application Launched

(11)

ClickOnce Basics

Update Options

On application startup

If an update is found, ask the user to update the application

After application startup

If an update is found, ask the user to update on the next run

Required updates

Specified by using the minimum required version

Programmatic updating

(12)

ClickOnce Basics

Application Bootstrapper

Installs the application prerequisites

.NET FX, Microsoft DirectX®, MDAC, and so on Requires administrator rights

Install the ClickOnce application after the

prerequisites

Use ClickOnce for automatic updates

(13)

ClickOnce Basics

The Bootstrapper in Action

Setup.exe Dotnetfx.exe

Web Server

Mdac_typ.exe Custom.msi Bar.application

Reboot

Client PC

Dotnetfx.exe Custom.msi

Bar.application MDAC detected!

Setup.exe

(14)

Building, Deploying and Updating a

Client Application

(15)

Security

Secure Execution Environment (Sandbox)

ClickOnce applications run in a sandbox by default

Permissions are based on origin Internet, Intranet, or Full Trust

Ensures that applications are safe to run

Similar to Microsoft Internet Explorer and JavaScript

Applications often need higher trust

Call unmanaged code

Access the file system or the registry Connect to a database

(16)

Security

Determining Permission Requirements

Security pane of Project Designer

Use to manually configure permissions

Permissions Calculator

Calculates the least-required permissions

Debug in the sandbox

Debug applications with partial trust Exception Assistant

Microsoft Intellisense® in the sandbox

(17)

Security

Trusted Application Deployment

Establishes deployment authority

One-time distribution

Configures the trusted license issuer

Trust licenses

Issued by an authority

Deployed with applications

Application-developer tasks

Obtain a trust license

(.tlic file)

Set the deployment ticket property

(18)

Security

User Consent Model

Users make trust decisions all the time

Installing software from CD-ROMs

Useful for targeting random computers

Internet or unmanaged Intranet User is the administrator

Request the required permissions

When the application needs permissions that are higher than the sandbox

(19)

Security

Secure Updates

ClickOnce manifests are signed

XMLDSIG

Publisher key is needed to deploy updates

Ensures that updates come from the original author Guarantees a unique application identity

Only the original publisher can update

(20)

Configuring ClickOnce Security

Permissions

(21)

Programming ClickOnce

Programming Scenarios

Application updating

Implement the Update Now menu item Match the client with back-end programs Customize when-to-update logic

Limit updates to only early adopters

Limit updates based on the server load

On-demand download

Progressive installation

Shell with application plug-ins

System.Deployment namespace

(22)

Programming ClickOnce

Application Updating

Control when and how the application updates

CheckForUpdate

GetUpdateCheckInfo Update

Synchronous and asynchronous versions of

methods

Available only for applications that are deployed

through ClickOnce

(23)

Programming ClickOnce

On-Demand Download

Group files in the manifest

Put related files in the same group Download files as a group

Marks files as optional in the manifest

Optional files are not downloaded during the

installation

AreFilesLocal

DownloadFiles

Takes a group or file name

Simultaneously delivery (synchronous or asynchronous) of multiple downloaded files

(24)
(25)

Summary

ClickOnce makes client-application

deployment easy and safe

Visual Studio bootstrapper facilitates the

easy redistribution of prerequisites

Visual Studio 2005 provides integrated

developer support for ClickOnce

ClickOnce APIs support a variety of

application-update scenarios

References

Related documents

Application Update form to be reinstated in the Program. There is no application fee associated with the Application Update form. If you enrolled at another college or university

Elevation Records memilih untuk merilis ulang album Sajama Cut “The Osaka Journals” ke dalam format piringan hitam dikarenakan piringan hitam merupakan rilisan fisik dalam format

Attend the presentation and receive an additional voucher entitling you to a 60% discount for six nights stay at the prestigious Royal Garden Hotel

Service Application Architecture in SharePoint 2010 Service Application Architecture and Components Topologies for Service Applications. Map Service Applications to Your

Further, cloud deployment eliminates the need for customers to upgrade their application software to the latest release or update outdated infrastructure (including hardware)

Update on Regional Extension Center Application Process and Key Health Alliance’s Application Update on Minnesota e-Health Workgroups.. Conference

Ø  Decrease  the  disability  and  death  toll  brought  about  by  cardiac  arrest.  Through  the  training,  participants  will  be  able  to  distinguish 

Yes, persons owning real property within the City and Borough of Juneau are considered local real property owners for this bond sale.... Will you sell bonds