Click Once Guide (PPT)

Introduction to ClickOnce

 Agenda

§  What is “ClickOnce”?

§  ClickOnce Basics

-   Demo: ClickOnce Publishing Smart Client Windows Applications

§  Fine-tuning ClickOnce

§  Requirements and updating

§  Prerequisites and Manifests

§  Security

§  ClickOnce API

§  Hints & Tips

 

ClickOnce Vision
 What is “ClickOnce”?

Bring the ease of

web application deployment to

client applications

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

The Best of the Client and Web
What is “ClickOnce”?

Demo: ClickOnce Publishing Smart Client Windows Applications

Fine-tuning ClickOnce
Development 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

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 be
support to cleanup
ClickOnce Cache

-   Always updates
on launch

.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

 

 

 

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

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

ClickOnce Basics
Update 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

ClickOnce Basics
Update Architecture

Manifests
Declarative Installation

§  Application manifest (n)

-   Authored by the developer

-   Describes the application

-   *.exe.manifest

-   Example: what assemblies constitute the application

§  Deployment manifest (1)

-   Authored by the administrator

-   Describes the application deployment

-   *. application

-   Example: what version clients should use

Manifests
Deployment & Application Manifests

Manifests
Deployment Manifest

Manifests
Deployment Manifest

Manifests
Deployment Manifest

Manifests
Deployment Manifest

Manifests
Application Manifest

Manifests
Application Manifest

Manifests
Application Manifest

Manifests
Application Manifest

Manifests
Application Manifest

ClickOnce Basics
Bootstrapper

§  Installs app prerequisites

-   .NET FX, SQLExpress, DirectX,..

-   Requires admin rights

-   Extensible architecture

-   Manages reboots

§  Installs ClickOnce app
after prerequisites

-   Use ClickOnce for auto-updates

-   No auto-updating of prerequisite components

Security
Introduction

§  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, …

Security
Determining required permissions

§  Security pane of Project Designer

-   Configure permissions manually

-   Permissions Calculator

-    Calculates least required permissions
-    Use declarative security
for dynamic actions

Ex. [WebBrowserPermission(
      SecurityAction.Demand,
      Unrestricted = true,
      Level =
      WebBrowserPermissionLevel.Default)]

-   Debug in sandbox

-   Intellisense in sandbox

Security
Microsoft 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/.pfx files!

-   Certificate origins

-    Verisign, …
-    Internal certification authority (CA)
-    MakeCert

-   Programs

-    MakeCert: creates X.509 certificate
-    SignCode, CertMgr, …

Security
User prompting

§   App requests required
permissions

-   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

Security
Scenarios 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

Security
Secure Updates

§              ClickOnce manifests are signed (XMLDSig)

n           Manifest hashed

n           Hash signed & signature created

n           Signature added to manifest

-             à Changing the manifest invalidates the signature

-             J 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

API Basics
Introduction

§  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

 

 

API Basics
Programming 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

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.

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提供的源码资源涵盖了Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 适合毕业设计、课程设计作业。这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。 所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值