210 likes | 303 Views
.NET deployment and configuration (but mostly about security). Jørgen Thyme Microsoft Denmark. Agenda. What’s an application? Building and Packaging Deploying and Administering Sharing and Culture. Common Language Runtime Applications. One or more assemblies Assemblies resolution
E N D
.NET deployment and configuration (but mostly about security) Jørgen Thyme Microsoft Denmark
Agenda • What’s an application? • Building and Packaging • Deploying and Administering • Sharing and Culture
Common Language RuntimeApplications • One or more assemblies • Assemblies resolution • Using metadata • Local (preferred) • Assembly Global Cache • Different applications may use different versions of an assembly • Easier software updates • Easier software removal
Applications overviewA lot of options • Rich client • Remember .NET Framework distributable! • Traditionel desktop • Controls (via IE) – no more ActiveX • Via (IE) aka No Touch Deployment • Thin clients • Web applications • Web services • Mobile web applications • PDA’er – compact framework
Agenda • What’s an application? • Building and Packaging • Deploying and Administering • Sharing and Culture
Building and PackagingAssemblies - review APP.EXE CLR Header MSIL Managed code Metadata
Building and PackagingBuilding Types Into An Assembly RUT.mod (using Compiler) Types.dll (using Compiler) RUT.cs method’s compiled MSIL FUT.cs method’s compiled MSIL Metadata RUT.cs defined types, methods… RUT.cs referenced types, methods… Metadata FUT.cs defined types, methods… FUT.cs referenced types, methods… Manifest Assembly files (self & RUT.mod) Exported types (self & RUT.mod)
RUT.mod (using Compiler) FUT.mod (using Compiler) RUT.cs method’s compiled MSIL FUT.cs method’s compiled MSIL Metadata RUT.cs defined types, methods… RUT.cs referenced types, methods… Metadata FUT.cs defined types, methods… FUT.cs referenced types, methods… Building and PackagingBuilding Types Into An Assembly Types.dll (using Assembly Linker) (No MSIL) Metadata Manifest Assembly files (FUT.mod & RUT.mod) Exported types (FUT.mod & RUT.mod)
Agenda • What’s an application? • Building and Packaging • Deploying and Administering • Sharing and Culture
Deploying and AdministeringSimple Application Deployment • Simple Deployment: • File copy using batch file setup • No modifications to registry or Active Directory • To uninstall the application, simply delete all the files • Other Deployment Methods: • .CAB • .MSI
Deploying and AdministeringSimple Administrative Control • Using Configuation File • An XML file • A file with .exe.config extension AppDir\ {application’s assembly files} AuxFiles\ {Types’sassembly files}
Deploying and AdministeringConfiguration File <configuration> <runtime> <assemblyBinding xmlns=“urn:schemas-microsoft-com:asm-v1”> <probing privatePath=“AuxFiles” /> </assemblyBinding> </runtime> </configuration>
Deploying and AdministeringSmart Application Deployment • Smart Deployment: • “Return of the Winform!” • Still no modifications to registry or Active Directory • Using the web • Components • Windows Forms applications – ”No Touch Install”
Agenda • What’s an application? • Building and Packaging • Deploying and Administering • Sharing and Culture
Sharing and CultureShared Assemblies • What Is It? • Specifically designed for use by multiple applications • Structurally identical to private assemblies • Must be placed in a specific location – Global Assembly Cache (GAC) <%WINDIR%>\Assembly • Must be registered using AL.EXE or GACUTIL.EXE
Sharing and CultureStrongly Name Assemblies Calculus.dll MSIL Metadata Manifest Public Key RSA Digital Signature Hash PE File Public Key Signed with private key RSA Digital Signature Hash File PE File
Sharing and CultureVersion Numbers • What Is Versioning All About? • Runtime only applies version policy to strongly named assemblies • Runtime uses whatever private assemblies it can find, regardless of its version information • Example 2.5.719.2 major.minor.build.revision
Sharing and CultureSide-By-Side Execution Calculus.dll AssemblyDef: Version: 1.2.3.4 Culture: “” PublicKey: 22acab57c8682eac App.exe AssemblyRef 1: Name: Calculus.dll Version: 1.2.3.4 Culture: “” PublicKeyToken: 22acab57c8682eac AssemblyRef 2: Name: AdvMath.dll (private assembly) AdvMath.dll AssemblyRef 1: Name: Calculus.dll Version: 2.0.0.0 Culture: “” PublicKeyToken: 03689116d3a4ae33 Calculus.dll AssemblyDef: Version: 2.0.0.0 Culture: “” PublicKey: 03689116d3a4ae33