HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
This PDF will be accessible from your Account page after purchase and requires PDF reading software, such as Acrobat® Reader®.
The eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
This is the eBook version of the printed book. If the print book includes a CD-ROM, this content is not included within the eBook version.
“ClickOnce demos may look simple, but those techniques only work for simple applications. Brian Noyes gives us the information we need to use ClickOnce in the real world, and he does it with a comprehensive and organized presentation. If you expect your smart client application to move very far beyond ‘Hello,World,’ you’ll want this book to help you deploy it.”
—Billy Hollis, president/owner, Elysian Consulting, Microsoft Regional Director
“Once again Brian has outdone himself. As a writer, I tend to be very critical of all technical publications, including my own . . . and it is such a pleasure to read anything Brian writes because he studies his topics well, resulting in an accurate, thorough, yet concise piece of work. ClickOnce being a new technology that deals with the pains we all have with application deployment, versioning, and security, it is important to have a text that will guide you through the learning process, give you sound advice for adopting the technology, and explain why you should even care. Brian gives his readers all of that.”
—Michele Leroux Bustamante, chief architect, IDesign, Microsoft Regional Director
“ClickOnce is the key to Windows and smart client deployment. Brian’s book is the key to successfully using ClickOnce. This book walks you through using ClickOnce, from the basics to advanced scenarios. It is an excellent resource.”
—Rockford Lhotka, principal technology evangelist, Magenic Technologies, Microsoft Regional Director
“Brian covers ClickOnce with a view to real-world deployment issues, which isobviously based on real-world experience. In and of itself, that is enough forme to buy the book. However, it is an even better investment by virtue of thefact that ClickOnce is a core part of the .NET Framework for Windows Forms2.0 now, and Windows Presentation Foundation in the future.”
—Michael Weinhardt, SDK programmer/writer, Application Model,Windows Presentation Foundation, Microsoft
“This book covers the most important ingredient needed for the success of asmart client application—deployment. The author’s unassuming writing style,combined with his in-depth coverage of the topic, makes this book an invaluableresource for all serious smart client developers.”
—Vishwas Lele, principal architect, Applied Information Sciences,Microsoft Regional Director
Microsoft’s new ClickOnce auto-updating technology can radically simplify application deployment. Using it, .NET developers and architects can deliver a powerful, smart client experience along with the easy maintenance of today’s best Web applications.
Microsoft Regional Director and MVP Brian Noyes has unsurpassed experience previewing and teaching ClickOnce to professional developers. In Smart Client Deployment with ClickOnce, Noyes demonstrates exactly how to make the most of ClickOnce in your real-world enterprise applications. Noyes covers ClickOnce design, architecture, security, installation, updates, and Bootstrapping—each with a full case study and detailed sample code.
This focused, concise book explains how to
The book’s sample code is available for download at www.softinsight.com/clickoncebook.
Figures xv
Foreword xxi
Preface xxiii
Acknowledgments xxxi
About the Author xxxiii
Chapter 1: Introduction to ClickOnce 1
What Is a Smart Client Application? 2
Why Choose Smart Clients? 6
Smart Client Deployment Challenges 7
Design Goals of ClickOnce 8
ClickOnce Features 9
Terminology 10
ClickOnce Deployment Modes 12
ClickOnce Deployment Architecture 14
ClickOnce Deployment Process Overview 16
First ClickOnce Deployment: ClickOnce Hello World 17
Software Requirements for ClickOnce 26
What to Deploy (and What Not to Deploy) with ClickOnce 28
ClickOnce Versus Other Deployment Technologies 30
Smart Client Architecture Overview 32
Where Are We? 34
Chapter 2: Initial Deployment with ClickOnce 37
Publishing an Application with Visual Studio 2005 38
ClickOnce Publishing Options 38
Visual Studio Publishing Step by Step 50
ClickOnce Application Initial Deployment Step by Step 64
Moving an Application to Production 76
Moving an Application into Production with Mage 77
Where Are We? 80
Chapter 3: Automatic Application Updates 83
Automatic Update Walkthrough 84
ClickOnce Update Options 91
Behind the Scenes on the Deployment Server 99
Behind the Scenes of an Update on the Client Machine 100
Removing or Restoring Applications on the Client 104
Restoring an Application Version from the Deployment Server 105
Republishing a Previous Version 105
Where Are We? 106
Chapter 4: On-Demand Updates 107
When Do On-Demand Updates Make Sense? 108
Introducing the ClickOnce API 109
Adding Synchronous On-Demand Updates 110
Performing Updates Asynchronously 114
Update Progress Notifications 122
Combining On-Demand Updates with Automatic Updates 123
Checking Detailed Update Information 125
Gathering Information about the Current Deployment 126
Where Are We? 128
Chapter 5: Application and Data File Management 131
Application Executable Deployment 132
Adding Application Files in Visual Studio 134
Configuring ClickOnce Application Files 135
Embedding Files in the Assembly 138
Localizing Your ClickOnce Deployment 141
Programmatic Download of Application Files 147
Deploying Extensible Plug-In Applications with ClickOnce 151
Managing Application Files with Mage 157
Managing Data Files Through Visual Studio 160
Dealing with Data Files on the Client 161
Data File Update Process 164
Deploying a Client Database with Your Application 167
Migrating SQL Compact Edition Database Files 168
Where Are We? 174
Chapter 6: ClickOnce Security 177
ClickOnce Security Overview 177
Internet Explorer Security Settings Affecting ClickOnce 188
Configuring ClickOnce Security Permissions 189
Understanding and Managing Publisher Certificates 197
Signing Application Updates 208
User Prompting 210
Trusted Applications’ User Security Policies 215
Trusted Publishers’ Permission Elevation 216
Adding Restricted Code Sections 219
Securing the Application Based on User Roles 221
Securing Access to ClickOnce Application Files on the Server 222
Where Are We? 223
Chapter 7: Prerequisite Deployment with the Bootstrapper 225
Bootstrapper Features 226
Bootstrapper and ClickOnce Sample Deployment 229
Adding Items to the Bootstrapper 234
Generating Bootstrapper Manifests 245
Where Are We? 248
Chapter 8: Advanced ClickOnce Topics 249
Using URL Query String Parameters 249
Executing Custom Install/Initialization Code 255
Debugging ClickOnce Applications 256
Deploying Unmanaged Applications with ClickOnce 261
Reg-Free COM 264
Deploying ClickOnce Applications with Firefox 266
Launching a ClickOnce Application Programmatically 267
Pushing ClickOnce Installations to the Client Machine 268
Web Server ClickOnce Configuration 272
MSBuild ClickOnce Publishing 273
Where Are We? 274
Appendix A: ClickOnce Deployment of WPF Applications 277
WPF Anatomy 101 278
ClickOnce Deployment of WPF Applications 280
Sample Web Browser Application Walkthrough 281
Where Are We? 284
Index 287