(12) United States Patent (10) Patent No.: US 8,336,043 B2 Lavery Et Al
Total Page:16
File Type:pdf, Size:1020Kb
USOO8336043B2 (12) United States Patent (10) Patent No.: US 8,336,043 B2 Lavery et al. (45) Date of Patent: Dec. 18, 2012 (54) DYNAMIC DEPLOYMENT OF CUSTOM 2006, 0080468 A1 4/2006 Vadlamani et al. CODE 2006, O136344 A1 6/2006 Jones et al. 2006, O155672 A1 7/2006 Lee et al. (75) Inventors: Darryn O. Lavery, Seattle, WA (US); OTHER PUBLICATIONS Adriaan W. Canter, Seattle, WA (US); Campbell, S., et al., Introducing Microsoft(R) VisualBasic 2005 for Sameer V. Bhangar, Seattle, WA (US); Developers, Microsoft Press (2005).* Byrd, P. Day 1: Introduction to Managed Code and the .NET Infra Thomas E. Quinn, Seattle, WA (US); structure, Toolbox for IT (2005).* Justin Kwak, Redmond, WA (US); Jeff “Click Once to Managed Code?,” Microsoft Monitor Weblog, Oct. Young, Snoqualmie, WA (US); Brent 29, 2003, A Jupiter Research Business Weblog. http://www. Rector, Redmond, WA (US) microsoftmonitor.com/archives/001774.html. “System. Deployment. Application Namespace.” (C) 2006 Microsoft Corporation, http://msdn2.microsoft.com/en-us/library/system.de (73) Assignee: Microsoft Corporation, Redmond, WA ployment.application(d printer).aspx, last accessed Nov. 15, 2006. (US) Bamford, Roger et al., “A Scalable and Highly Available Networked Database Architecture.” Proceedings of the 25th VLDB Conference, (*) Notice: Subject to any disclaimer, the term of this Edinburgh, Scotland, 1999, pp. 199-201. patent is extended or adjusted under 35 Carmo, Joao Leonardo et al., “Using Visual Studio Extensibility Mechanisms for Requirements Specification.” 2005, International U.S.C. 154(b) by 1658 days. Conference on Innovative Views of the .Net Technology, pp. 45-57. Jai, Benchiao, "A Lightweight Dynamic OOP Framework for Auto (21) Appl. No.: 11/675,591 matic Application Location, Installation and Upgrade.” 1998, http:// scholar.google.com/scholar?hl=en&lr=& (22) Filed: Feb. 15, 2007 q=cache:WWQcfgl4yFw.J:www.bell-labs.com/user/benai/ OOPSLA'98.pdf+application+installation+add+ins, last accessed (65) Prior Publication Data Sep. 13, 2006). Noyes, Brian, “Deploy and Update Your Smart Client Projects. Using US 2008/O2O1707 A1 Aug. 21, 2008 a Central Server.” MSDN Magazine, May 2004, http://msdn. microsoft.com/msdnmag/issues/04/05/ClickOnce/default.aspx. (51) Int. Cl. G06F 9/445 (2006.01) * cited by examiner (52) U.S. Cl. ........................................ 717/173; 717/178 Primary Examiner — Anna Deng (58) Field of Classification Search .................. 717/169, (74) Attorney, Agent, or Firm — Perkins Coie LLP 717/172,173, 175, 178 See application file for complete search history. (57) ABSTRACT A method and system for dynamically downloading custom code for execution within a host application is provided. A (56) References Cited deployment system augments the manifest used for deploy ing managed applications to include information describing U.S. PATENT DOCUMENTS how the host application is to use the custom code, referred to 5,797,015 A 8, 1998 Daniels, Jr. et al. as host manifest information. The deployment system reports 5,916,308 A 6, 1999 Duncan et al. the progress of the downloading of the manifest and the 6,347,398 2, 2002 Parthasarathy et al. ....... 717/178 custom code to the host application. The host application can 6,976,037 B1 12, 2005 D'Souza et al. then perform appropriate host-specific processing. The host 2004.01284.00 A1 T/2004 Srinivasan et al. application may provide to the deployment system an inter 2004/0268301 A1 12, 2004 Kaston 2005, 0160104 A1 7/2005 Meera et al. face for verifying the trust of the custom code. The deploy 2005, 0160414 A1 7/2005 Parnanen et al. ment system also allows the host application to control the 2005, O2624.80 A1 11/2005 Piketal. uninstalling of the custom code. 2006.0036993 A1 2, 2006 Buehler et al. 19 Claims, 7 Drawing Sheets 430 440 unmanaged custom managed custom 41 42 (ccidentifier) start CLR - 431 assage isaitiate host CCM 432 441 instantiatechest CCDM) CCM s instantiate IPHM 33 --F 44 CCM:Install H PHM:GetManifestAsync 443 receive eyet GetManifestcompleted HM: DownloadApplicationAsync 4 event: Irwoke custarticise DownloadApplicationCompleted U.S. Patent Dec. 18, 2012 Sheet 1 of 7 US 8,336,043 B2 I"OIH U.S. Patent Dec. 18, 2012 Sheet 2 of 7 US 8,336,043 B2 host process 2OO host Code 210 unmanaged custom Code loader 220 O |ReportProgress TrustVerify host CCDM managed 231 Custom Code loader 230 FIG 2 U.S. Patent Dec. 18, 2012 Sheet 3 of 7 US 8,336,043 B2 host process 3OO C ReportProgress TrustVerify host 310 Host CCDM 311 Custom Code loader (unmanaged) 320 Custom COde loader (managed) 330 FIG. 3 U.S. Patent Dec. 18, 2012 Sheet 4 of 7 US 8,336,043 B2 U.S. Patent Dec. 18, 2012 Sheet 5 Of 7 US 8,336,043 B2 CCDM:nstall security 501 receive event GetManifestCompleted 502 check signature of manifest signature verified |TrustVerify:Verify Trust (evidence) return error N FIG. 5 U.S. Patent Dec. 18, 2012 Sheet 6 of 7 US 8,336,043 B2 CCDM. Instal 6O1 |ReportProgress: OnCCInstalling 6O2 ReportProgress: On Manifestdownloading s 603 receive event GetManifestCompleted 604 |Report Progress: On Manifest)OWnloaded 605 out of date Y 606 ReportProgress: OnCCDownloading 6O7 receive event DownloadedProgressChanged 608 |ReportProgress. OnCC Downloaded ProgressChanged 609 receive event DownloadApplicationCompleted 610 |ReportProgress: On CCDownloaded 611 ReportProgress: OnCCInstalled FIG. 6 U.S. Patent Dec. 18, 2012 Sheet 7 Of 7 US 8,336,043 B2 704 verify trust of managed app unloading from Cache FIG. 7 US 8,336,043 B2 1. 2 DYNAMIC DEPLOYMENT OF CUSTOM hosting program is then provided with the identifier (e.g., CODE URL) of the application manifest. To deploy the application program, the hosting program uses the manifest identifier to BACKGROUND retrieve the manifest from the deployment server. The hosting program can then download the components specified in the The deployment of Software within an organization has manifest, install the managed application within the .NET traditionally been an expensive and time-consuming process. Framework, and start the execution of the managed applica For example, an organization that wants to install an applica tion in an appdomain that is separate from the appdomain of tion program on each of its computer systems may need to the hosting program. To help the hosting program with have a technician go to each computer system and manually 10 control the installation of the application program. To help deploying managed applications, the ClickOnce deployment reduce the expense and time of deploying application pro technology provides an in place hosting manager class grams, an administrator of an organization may use a system (“IPHM). The hosting program instantiates an in place host management service to control the deployment. A system ing manager object and requests the object to install the management service helps automate the installation of the 15 managed application specified by the application manifest. application programs on the computer systems of the organi The in place hosting manager object may help ensure that the Zation. The system management service could distribute and managed application can be trusted (e.g., by comparing the install various application programs on the desired computer provider to lists of trusted or untrusted providers). The in systems. After an application program is installed on desired place hosting manager object may also ensure that the man computer systems of the organization, the users of those aged application executes with the security level specified in computer systems can start to use the application program. the application manifest. The in place hosting manager object Although system management services have achieved their may cache the downloaded managed application so that it can goal of reducing expense and time, such static deployment of Subsequently load the managed application without having to application programs has some disadvantages. First, even download it again from a server. As needed, the in place though the Software may be installed on a certain computer 25 hosting manager object will automatically remove managed system, the user may never use that application program. As applications from the cache. The in place hosting manager a result, the installed application program is unnecessarily object may also ensure that the most recent version of a consuming resources (e.g., disk space) of the computer sys managed application is loaded. tem. Second, a user who wants to use the application program Many application programs, both managed and unman may not have it installed on their computer system because it 30 aged, allow custom code (e.g., addins and document-level was not designated as a desired computer system during customizations) to be provided by third parties. Such appli deployment. In such a case, an administrator may need to cation programs expose functionality that can be used by the manually control the installation of the application program custom code. The custom code may improve the usability of on that user's computer system. the application programs or provide additional functionality Many application programs are developed to be "man 35 (e.g., domain-specific functionality). Custom code logically aged' applications that execute within the .NET Framework executes in the same process space or appdomain as the provided by Microsoft Corporation. The .NET Framework application program, rather than as an executable application. provides a common language runtime (“CLR) that provides Because of the ease of developing custom code as managed high-level operating system type services to the managed code, many application programs Support the execution of applications and serves as an execution engine for managed 40 custom code in the NET Framework. The custom code may applications. The CLR ensures that managed applications do be stored as a dynamic link library, which can be loaded into not take any unauthorized action.