.NetDeploymentNOEA / PQC 2005 Application Deployment and Versioning Source: Joe Hummel, kursus i.Net, jan. 2003.

Slides:



Advertisements
Similar presentations
What is.Net Gary Devendorf. .Net Framework.Net framework works like the Domino Objects only much lower level and very complete It is part of the OS (or.
Advertisements

ACT! “Web” Plugins ACC Webinar (Part 1of 2) Brian Mowka and Jamie Aurand December 2010.
Building Localized Applications with Microsoft.NET Framework and Visual Studio.NET Achim Ruopp International Program Manager Microsoft Corp.
16.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft® Windows® Server 2003 Active Directory Infrastructure.
LAB#2 JAVA SECURITY OVERVIEW Prepared by: I.Raniah Alghamdi.
Smart Clients What, Why, and Where By: Richard Arthur.
Deployment Your Salvation from DLL Hell. Objectives Overview Assemblies „XCopy“ Deployment Configuration Administration.
ASP.NET Reuven Abliyev Elyahu Sivaks Ariel Daliot.
Advanced Object-Oriented Programming Features
1/50 Project Management. 2/50 StumbleUpon 3/50 Overview Customize? Why, what, how?.NET Framework overview & fundamentals Class libraries, namespaces,
.NET deployment and configuration (but mostly about security) Jørgen Thyme Microsoft Denmark.
Assembly Where it all gets physical. Objectives Introduce concepts of assemblies Discuss elements of assemblies Show how to build assemblies Runtime aspects.
ASP.Net Security: Fundamentals Chapters 1-4 Freeman and Jones Book.
2. Developing in.NET and C#. 2 Microsoft Objectives “Microsoft.NET development is based on an underlying framework of tools and classes. These tools and.
Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.
 Visual Studio has great support for building ASP.NET web applications  Real web application development involves more than just copying the files created.
Fraser Technical Solutions, LLC
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
Module 15 Configuring and Deploying Windows Client Applications.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Smart Client Applications for Developers Davin Mickelson, MCT, MCSD New Horizons of MN.
Chapter-4 Windows 2000 Professional Win2K Professional provides a very usable interface and was designed for use in the desktop PC. Microsoft server system.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
1..NET Architecture Based on slides by Joe Hummel.
1 Namespaces and Assemblies © University of Linz, Institute for System Software, 2004 published under the Microsoft Curriculum License.
1 Program Execution in the 21 st Century Modern Software Development in.NET and C# A webcast series for C++, Java, and VB6 developers – Part 1 of 15: [
DEV343.NET Application and Library Versioning Juval Löwy
CIS NET Applications1 Chapter 2 –.NET Component- Oriented Programming Essentials.
.NET Framework & C#.
Understanding Code Compilation and Deployment Lesson 4.
Webinar presented by Erick Polsky 10/2/2012. What is.Net? Combines… Language Independence Memory Management Database Access Class Libraries Operating.
Importing outside DLLs into.Net platform and using them By Anupama Atmakur.
DEV290 Building Office Solutions with Visual Studio Eric Carter Lead Developer Developer Platform & Evangelism Microsoft Corporation.
Presenter: PhuongNQK. Goals Provide you insights into core concepts of.NET framework  Assembly  Application domain  MSIL.
Ken Casada Developer Evangelist Microsoft Switzerland WebMatrix: Your Web Made.
ASSEMBLY. A SSEMBLY Assemblies are the fundamental units of applications in the.net framework An assembly can contain classes, structures, interfaces.
ASSEMBLIES AND THE GAC CHAPTER 1, LESSONS 4-7 & LAB.
Agenda Assemblies 101 Anatomy of an Assembly What is Metadata? Assembly Variations Signing Assemblies Global Assembly Cache.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
1..NET Architecture Based on slides by Joe Hummel.
.NET Framework Danish Sami UG Lead.NetFoundry
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
Java2C# Antonio Cisternino Part V. Outline Assembly & co. Visual Studio environment Example: using DirectX from C#
.Net – The First Glance What Is.Net, Why Use.Net.
Section 11: Implementing Software Restriction Policies and AppLocker What Is a Software Restriction Policy? Creating a Software Restriction Policy Using.
AUC Technologies Projects Consulting, Development, Mentoring, and Training Company.NET Assemblies Presented By : Muhammad Atif Hussain Deputy Manager IT.
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Web Part Development Overview VITALE, CATURANO & COMPANY LTD SharePoint Developer Series – Web Part.
Lecture 4: J# Execution Model. 2 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET 4-2 Objectives “J# programs execute like any other.NET program.
.NET Ying Chen Junwei Chen. What is Microsoft.NET. NET is a development platform Incorporated into.NET COM+ component services ASP web development framework.
Java Security Session 19. Java Security / 2 of 23 Objectives Discuss Java cryptography Explain the Java Security Model Discuss each of the components.
Creating and Managing Digital Certificates Chapter Eleven.
1. The .NET Architecture 1. The .NET Architecture 2003
DEV395 No Touch Deployment for Windows Forms Jamie Cool Program Manager.NET Client Microsoft Corporation.
What is GAC Repository containing all the assemblies of CLR Machine wide Assemblies shared by several applications Where CLR is installed C:\Windows\Microsoft.NET\assembly\GAC_MSIL.
Module 4: Deployment and Versioning. Overview Introduction to Application Deployment Application Deployment Scenarios Related Topics and Tools.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Web Parts Overview Web parts in SharePoint 2007 “Hello World” web part Typical deployment.
Internet Explorer 7 Updated Advice for the NHS 04 February 2008 Version 1.3.
Appliance Management StratusLab Tutorial (Orsay, France) 28 November 2012.
Assemblies. 2 Objectives Introduce assemblies –concept –creation –naming Discuss deployment –main.exe –dependent assemblies.
Active X and Signed Applets Chad Bollard. Overview ActiveX  Security Features  Hidden Problems Signed Applets  Security Features  Security Problems.
ClickOnce Deployment (One-click Deployment)
Lecture 1: The .NET Architecture
Packaging and Deploying Windows Applications
Chapter 9 S. NandaGopalan, BIT
Using The Default CLR Host
StratusLab Tutorial (Bordeaux, France)
.NET and .NET Core 2. .NET Runtimes Pan Wuming 2017.
.NET Framework: Backdoors
ClickOnce Deployment (One-click Deployment)
Presentation transcript:

.NetDeploymentNOEA / PQC 2005 Application Deployment and Versioning Source: Joe Hummel, kursus i.Net, jan. 2003

2.NetDeploymentNOEA / PQC 2007 Objectives “Before.NET, the Component Object Model (COM) was the prevalent application design model..NET replaces COM with an entirely new model that is programming-language independent, registry-free, tamper-resistant, and version-aware …” Assembly navngivning Versionsstyring Deployment

3.NetDeploymentNOEA / PQC 2007 Del 1 Assembly naming…

4.NetDeploymentNOEA / PQC 2007 Remember component based developement Application layers gives many components / classes Example: –A typical stand-alone GUI app has 3 components –Packed as 1 EXE and 2 DLLs Front-end object app.exe business.dll data.dll

5.NetDeploymentNOEA / PQC 2007 Remember assemblies 1 assembly = 1 or more compiled classes –.EXE represents one assembly with classes + Main program –.DLL represents one assembly with classes Development Tools.EXE /.DLL code.vb code.cs assembly

6.NetDeploymentNOEA / PQC 2007 Assembly names An assembly may have a 4-part "name": –Friendly, for humans readable name –culture –version number –public key token DataComponent, Culture=neutral, Version= , PublicKeyToken= abcdef

7.NetDeploymentNOEA / PQC 2007 Assigning name 1.Friendly, for humans readable name: –Required –set by Project properties >> Assembly Name 2.Culture 3.Version number 4.Public key token optional, set by.NET attributes

8.NetDeploymentNOEA / PQC 2007 Assembly-level attributes Visual Studio projects uses a special file for these See "AssemblyInfo.cs" using System.Reflection;. [assembly: AssemblyDelaySign(false)] [assembly: [assembly: AssemblyVersion(" ")] [assembly: AssemblyCulture("")] // neutral

9.NetDeploymentNOEA / PQC 2007 Recall reference to assembly When assembly A referes to assembly B… –…metadata are stored in both assembly manifests PE/COFF HeaderCLR MetadataCode App.exe Public Key Token (8 bytes) extern Component PE/COFF HeaderCLR MetadataCode Public Key (128 bytes + 32 byte header) Signature Component.dll /r:Component.dll Version

10.NetDeploymentNOEA / PQC 2007.NET is version-avare By default CLR loads only the exact version –The program stops if the exact version can not be found –Example: –App.exe is compiled to v of Component.dll –then App.exe only runs if v can be loaded NOTE: version-avare loading requires that the assembly has a "strong name" …

11.NetDeploymentNOEA / PQC 2007.NET is tamper-proof CLR uses cryptography to avoid tampering –assemblies can be digitally-signed –based on public / private key encrypting –CLR cannot load the assembly, if it suspects tampering is the client's public key not correct (the DLL replaced by a hacker?) digitial signature doesn't match (the DLL replaced by a hacker?) Assemblies with a digital signature has a "strong name"

12.NetDeploymentNOEA / PQC 2007 Generate a public-private key pair use "SN" command-line utility –-k option generates key pair –place the file in the root of the Visual Studio project folder

13.NetDeploymentNOEA / PQC 2007 Protect the key file! The key file is the key to ensure the security You don't want all your developers has access to it… This is why Visual Studio don't supports key generation –have to use a command-line tool and why.NET supports "delayed" signing –Developers works with unsigned assemblies in-house –Before deployment the deploy team signs the assemblies with the key using System.Reflection;. [assembly: AssemblyDelaySign(true)]

14.NetDeploymentNOEA / PQC 2007 Part 2 Version control…

15.NetDeploymentNOEA / PQC 2007 version control problem Problem: –application A uses component B –you want to make a new version of B –is it hereafter safe for A to use the new version of B?

16.NetDeploymentNOEA / PQC 2007 Version control in.NET Version control in.NET is very simple: –CLR loads only the assembly if the version number matches precisely –if you want the app shall use a new version then don't change the version number –if you don't want the app to use the new version then change the version number –There is a third posibilty, see later.....

17.NetDeploymentNOEA / PQC 2007 Del 3 Deployment…

18.NetDeploymentNOEA / PQC 2007 Deployment the registry database is gone in.NET How are apps / assemblies deployed? In a way we return to the (good?) old days with DOS –CLR uses a wellknown search algoritm –Customize searching by.config (".ini") files

19.NetDeploymentNOEA / PQC 2007 What are the options? 1. Private assembly (APPBASE) –install EXE / DLLs in the same directory –easiest form of deployment ("xcopy") 2. Global assembly cache (GAC) –install DLLs into GAC –allows you to share DLLs, install different versions –allows you to pre-JIT 3. Download cache (CODEBASE) –you can tell CLR where to download from –allows you to install / upgrade from server –users can also download via Internet Explorer (URL to.exe)

20.NetDeploymentNOEA / PQC 2007 Further options... 4.Use web services (like option 3) 5.In.Net 3.0+ / WPF run in the browser(msie, firefox....) or as a windows app. 6.Use Silverlight (as in Flash)

21.NetDeploymentNOEA / PQC 2007 Recall the GAC… Global Assembly Cache How to put something in the GAC? –administrator rights are need'ed –assembly must have a “strong name” –use "gacutil" command-line tool:

22.NetDeploymentNOEA / PQC 2007 Assembly search algorithm (approx) Use file found at CODEBASE Match in Global Cache? Apply Version Policy CODEBASE hint provided? Does file match reference? Assembly.Load Fails Is file found via probing dir? Use file found from probing dir Use file found in Global Cache Y N N N N Y Y Y Does file match reference? N Y Assumes CLR is looking for an assembly based on 4-part name

23.NetDeploymentNOEA / PQC 2007 Config files XML-based config files can be used for controlling CLR loading Examples: –load another version of an assembly –download assembly from a given server

24.NetDeploymentNOEA / PQC 2007 Example #1 Version redirect –App.exe is compiled against v of Component.dll –we want that App.exe uses version <assemblyIdentity name="Component" publicKeyToken=" abcdef" /> <bindingRedirect oldVersion=" " newVersion=" " /> App.exe.config

25.NetDeploymentNOEA / PQC 2007 Example #2 Download assembly to download cache Specify assembly location by CODEBASE hint <assemblyIdentity name="Component" publicKeyToken=" abcdef" /> <codeBase version=" " href=" App.exe.config

26.NetDeploymentNOEA / PQC 2007 Summary.NET supports full component based developement.NET development deployment seems to be better: –programming language undependent –no registry –version-aware –tamper-resistant My fear? –"DLL hell" to be replaced by ".config file hell"…

27.NetDeploymentNOEA / PQC 2007 References Books: –J. Richter, "Applied Microsoft.NET Framework Programming" Web sites: – –Download-based deployment: nts/default.aspxhttp://msdn.microsoft.com/msdnmag/issues/02/07/NetSmartClie nts/default.aspx sp?url=/msdn-files/026/002/880/msdncompositedoc.xmlhttp://msdn.microsoft.com/code/default.asp?url=/code/sample.a sp?url=/msdn-files/026/002/880/msdncompositedoc.xml