Efficient Deployment & Management of ASP.NET 2.0 Applications on IIS 6.0 Alexis Eller Program Manager Internet Information Services Microsoft Corporation.

Slides:



Advertisements
Similar presentations
Running PHP on Windows Server 2008 and IIS 7 Rob Cameron Developer Evangelist, Communications Sector Microsoft.
Advertisements

Randy Williams, MOSS MVP Senior Consultant Synergy Corporate Technologies.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 13: Administering Web Resources.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 13: Administering Web Resources.
IIS v7.0 Martin Parry Developer & Platform Group Microsoft Limited
Satisfy Your Technical Curiosity Internet Information Services (IIS) 7.0 End-to-End Overview of Microsoft's New Web Application Server Bart De Smet MVP,
Hands-On Microsoft Windows Server 2003 Administration Chapter 5 Administering File Resources.
Eben de Wit Developer Advisor Microsoft
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 10: Server Administration.
Internet Information Server (IIS)
IIS7 for Developers Leon Langleyben Chief Architect SRL Group
Jonas Thomsen, Ph.d. student Computer Science University of Aarhus Best Practices and Techniques for Building Secure Microsoft.
Server Roles and Features.NET Framework 3.51.NET Framework 4.5 IIS Web Server IIS Default Document IIS Directory Browsing IIS HTTP Errors.
April-June 2006 Windows Hosting Seminar Series Product Roadmap: IIS 7.0 Matthew Boettcher Web Platform Technical Evangelist (Hosting) Developer & Platform.
IT533 Lectures Configuring, Deploying, Tracing and Error Handling.
11 SHARING FILE SYSTEM RESOURCES Chapter 9. Chapter 9: SHARING FILE SYSTEM RESOURCES2 CHAPTER OVERVIEW Create and manage file system shares and work with.
Edwin Sarmiento Microsoft MVP – Windows Server System Senior Systems Engineer/Database Administrator Fujitsu Asia Pte Ltd
9.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infrastructure.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
A Close Look Inside the SharePoint Engine Randy Williams, MVP MOSS Synergy Corporate Technologies

Understanding Code Compilation and Deployment Lesson 4.
Chapter 7: WORKING WITH GROUPS
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 13: Administering Web Resources.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Microsoft Internet Information Services 5.0 (IIS) By: Edik Magardomyan Fozi Abdurhman Bassem Albaiady Vince Serobyan.
Basic Developer Knowledge That Every SharePoint Admin Must Have Randy Williams, MVP MOSS Synergy Corporate Technologies
ASP.NET application. Roadmap ASP.NET file types Bin directory Application updates Simple application from start to finish using a virtual directory Behind.
.NET Framework Danish Sami UG Lead.NetFoundry
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
March 12 & 13, 2007 IIS 7.0 for CFML Developers Deploying on IIS 7.0 with Adobe ColdFusion and New.
Chapter 9: SHARING FILE SYSTEM RESOURCES1 CHAPTER OVERVIEW  Create and manage file system shares and work with share permissions.  Use NTFS file system.
Dr. Mustafa Cem Kasapbaşı Security in ASP.NET. Determining Security Requirements Restricted File Types.
SECURITY ISSUES. Introduction The.NET Framework includes a comprehensive set of security tools –Low-level classes and an overall framework –Managing code.
The.NET Runtime and IIS Presented by Chris Dickey – cdickey.net consulting
Hands-On Microsoft Windows Server Implementing Microsoft Internet Information Services Microsoft Internet Information Services (IIS) –Software included.
Module 2: Overview of IIS 7.0 Application Server.
Chapter 10 Chapter 10: Managing the Distributed File System, Disk Quotas, and Software Installation.
What is Web Site Administration Tool ? WAT Allow you to Configure Web Site With Simple Interface –Manage Users –Manage Roles –Manage Access Rules.
Windows Role-Based Access Control Longhorn Update
Ins and Outs of Authenticating Users Requests to IIS 6.0 and ASP.NET Chris Adams Program Manager IIS Product Unit Microsoft Corporation.
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Web Part Development Overview VITALE, CATURANO & COMPANY LTD SharePoint Developer Series – Web Part.
DEV303 ASP.NET: Leveraging Visual Studio.NET For Web Projects Tony Goodhew Product Manager Microsoft Corp.
GUDURU PRAVEEN REDDY.NET IMPERSONATION. Contents Introduction Impersonation Enabled Impersonation Disabled Impersonation Class Libraries Impersonation.
Asia Pacific SharePoint Conference 2007 May 15th to 16th, 2007 Hilton Hotel Sydney.
Web Access. Overview  Purpose  Prerequisites  Install Components  Enable Virtual Directories  IIS Configuration & Security  Troubleshooting.
IIS and.Net security -Vasudha Bhat. What is IIS? Why do we need IIS? Internet Information Services (IIS) is a Web server, its primary job is to accept.
April-June 2006 Windows Hosting Seminar Series Technical Labs.
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
Module 4: Design IIS Maintenance and UDDI. Designing Internet Information Services Backup and Recovery Specifying Monitoring requirements Deploying UDDI.
IIS 7 for Hosters Deven Kampenhout Web Platform Architect Developer & Platform Evangelism.
Migrating ASP to ASP.NET Matt Gibbs ASP.NET Development Manager.
Configuring and Deploying Web Applications Lesson 7.
IIS Manager Details Delegated Administration Configuration System.
Module 14: Advanced Topics and Troubleshooting. Microsoft ® Windows ® Small Business Server (SBS) 2008 Management Console (Advanced Mode) Managing Windows.
Internet Information Server 6.0 & new management features.
Alexey Polovinkin Post graduate student, CMC department.
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
Building More Powerful ASP.NET Applications with IIS7 Michael Volodarsky COM303 Program Manager Microsoft Corporation.
Efficient Deployment & Management of ASP. NET 2
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 13: Administering Web Resources.
Security mechanisms and vulnerabilities in .NET
الخطوات المطلوب القيام بها قبل انشاء الموقع
ASP.NET Module Subtitle.
IIS v7.0 Martin Parry Developer & Platform Group Microsoft Limited
Presentation transcript:

Efficient Deployment & Management of ASP.NET 2.0 Applications on IIS 6.0 Alexis Eller Program Manager Internet Information Services Microsoft Corporation

Agenda What is ASP.NET?.NET Framework Concepts Global Assembly Cache (GAC) Configuration Layout Code Access Security (CAS) Versioning Deployment & Management Running x64 on ASP.NET 2.0 solutions Summary / Q&A

What is ASP.NET? Part of the.NET Framework IIS 6.0: v2.0, v1.1 in Worker Process Isolation Mode IIS 6.0: v1.0 in IIS 5.0 Compatibility Mode IIS 5.0: only run one version at a time Builds significantly on the power of ASP ASP.NET is “managed” code - the.NET Framework manages memory, not the application (reduces the risk of memory leaks)

.NET Framework Concepts Global Assembly Cache (GAC) “Registry” for.NET assemblies Add an assembly to the GAC: Generate a strong name, assembly: 1) name, 2) version, 3) 64 bit public key hash - sn.exe, 4) culture Add to the GAC - gacutil.exe,.NET Configuration x.x (MMC Snap-in) Viewing the contents of the GAC: gacutil /l start explorer %windir%\assembly.NET Configuration x.x (MMC Snap-in) Cannot XCOPY deploy GAC’ed assemblies Security: all GAC’ed assemblies (for ASP.NET apps): Run as Full Trust Are accessible to all ASP.NET apps

Adding an assembly to the GAC

.NET Framework Concepts Configuration Layout root configuration files machine.config root web.config web.config.NETFramework ASP.NET ASP.NET +.NET Framework web.config files Inheritance…

.NET Framework Concepts Code Access Security (CAS) Constrains managed code, including ASP.NET Do you trust your content providers? Do you trust that your applications can’t be exploited? Control access to: file system, registry, printers ASP.NET Trust Levels Full, High, Medium, Low, Minimal (can define custom) Defined by policy files: %windir%\Microsoft.NET\Framework\v \CONFIG\web*trust.config Full trust by default GAC’ed assemblies run as Full trust always

.NET Framework Concepts ASP.NET Medium Trust Access SQL Server Send via SMTP Access certain common environment variables Access files within the application's directory Access files outside the application's directory Use reflection Use sockets Access unmanaged code How to Use Medium Trust in ASP.NET 2.0: us/dnpag2/html/PAGHT asp us/dnpag2/html/PAGHT asp us/dnpag2/html/PAGHT asp

Setting and customizing ASP.NET Trust Levels

ASP.NET Request Processing IIS maps request to ASP.NET, forwards to aspnet_isapi.dll ASP.NET ISAPI creates appdomain Send Response LogCompress NTLMBasic Determine Handler CGI Static File ISAPI Authentication Anon … … Authentication Forms Windows Map Handler ASPX Trace … … …aspnet_isapi.dll

Deployment and Management Getting started... Manual: MMC snap-in (in IIS Manager) aspnet_regiis.exe command line tool Edit web.config files using Notepad or Visual Studio Automated: Call aspnet_regiis.exe in a batch file Program against the ASP.NET configuration API (System.Configuration)

Deployment and Management aspnet_regiis.exe Provides more functionality than MMC snap-in Enumerate all ASP.NET script map settings Install / uninstall ASP.NET Enable / disable ASP.NET ISAPI extension Unique version in each framework directory: C:\Windows\Microsoft.NET\Framework64\v C:\Windows\Microsoft.NET\Framework64\v Use in batch files for deployment / management Combine with other utilities to create batch files for deploying applications, content and configurations

Deployment and Management aspnet_regiis.exe (2) Combine aspnet_regiis.exe with other utilities for automating deployment Adsutil.vbs to create application pool adsutil.vbs CREATE W3SVC/AppPools/BusyPool "IIsApplicationPool" IISweb.vbs to create the Web site in app pool IISweb.vs /create C:\MySource "MySite" /ap BusyPool /dontstart Aspnet_regiis.exe to install ASP.NET 2.0 change the IIS scriptmap to 2.0 C:\WINDOWS\Microsoft.NET\Framework\v \aps net_regiis.exe –enable -ir C:\WINDOWS\Microsoft.NET\Framework\v \aps net_regiis.exe –s W3SVC/ Aspnet_regiis.exe to install ASP.NET 2.0 change the IIS scriptmap to 2.0 C:\WINDOWS\Microsoft.NET\Framework\v \aps net_regiis.exe –enable -ir C:\WINDOWS\Microsoft.NET\Framework\v \aps net_regiis.exe –s W3SVC/

.NET Framework Versioning Can run one version per application pool Each framework version has it’s own version of aspnet_regiis.exe Different IIS scriptmap behavior depending on existing ASP.NET Initial ASP.NET Configuration Scriptmap Behavior Location of Aspnet_regiss.exe ASP.NET not previously installed IIS Scriptmap defaults to 2.0 C:\WINDOWS\Microsoft.NET\Fram ework\v ASP.NET 1.1 previously installed Existing scriptmaps unchanged IIS Scriptmap continues to default to 1.1 C:\WINDOWS\Microsoft.NET\Fram ework\v C:\WINDOWS\Microsoft.NET\Fram ework\v

Running ASP.NET 1.1 and 2.0 Side-by-Side

Deployment and Management ASP.NET 2.0 MMC Snap-In Overview of the ASP.NET user interface Configuration tabs Understanding the behavior of the MMC snap-in

Deployment and Management Overview of ASP.NET MMC Snap-in ASP.NET configuration is: hierarchical and distributed complex enough to warrant a user interface The ASP.NET MMC Snap-in uses Microsoft® Internet Information Services (IIS) Manager’s extensibility

Deployment and Management Overview of ASP.NET MMC Snap-in Prevents typo’s, incorrect XML tags Manages versioning information Indicates file and virtual path Indicates the date file last modified

Deployment and Management Configuration Tabs General Connection strings, Application data Custom Errors AuthorizationAuthentication Authentication settings Membership provider Role Manager provider and enable/disable Application Compilation, Globalization, Identity State Management Session State settings Locations User-defined settings entered as tags in configuration

Deployment and Management Configuration Tab - General What can be modified? Database Connections Application Settings Which web.config file is edited? Depends on the object selected in IIS Manager... Server (Web Sites) Web Site Virtual Directory / Folder

Deployment and Management Configuration Tab – Custom Errors What can be modified? Enabling local or remote- only custom errors Redirect URLs for specific status codes Default redirect URL What cannot be modified? IIS’s custom errors configuration in the metabase

Deployment and Management Configuration Tab – Auth’N and Auth’Z What can be modified? Authentication: Forms vs. Windows Forms authentication settings Membership and Roles providers Authorization Rules: only apply to content handled by the ASP.NET 2.0 ISAPI What cannot be modified? IIS Authentication: Anonymous, Basic, Integrated, etc. IIS does access checks, not authorization rules per URL IIS 6.0 ships with Authorization Manager ISAPI (urlauth.dll) - this is different than ASP.NET authorization

Deployment and Management Configuration Tab – Application What can be modified? Compilation and runtime settings Assign a theme to specific page or master page Debugging options Used for development purposes Should be used only in non-production environments (performance considerations) Tip: Tip: Globalization options Setting the Code Page, etc. Identity settings Use IIS’s impersonated token -or- override with a specified user identity

Deployment and Management Configuration Tab – State Management What can be modified? Enable ASP.NET Session State Server Enable ASP.NET Session State in SQL Server State management connection strings ASP.NET Session State Server vs. ASP.NET Session State in SQL Server ASP.NET State Server stores state in a process separate from the ASP.NET application ASP.NET Session State in SQL Server stores application\session data in SQL

Deployment and Management Configuration Tab – Locations What can be done with the Locations Tab? Lockdown of features at a granular level Examples: “AllowOverride=false” with a relative path Advanced concept - requires a thorough understanding of configuration...

Configuring Forms Auth in the ASP.NET MMC Snap-in

Deployment and Management Understanding the MMC Snap-in Behaviour Multiple configuration editors (such as administrators and developers) can cause errors in the configuration files Configuration errors in the files will cause errors in the user interface User interface cannot read invalid configuration files Updates to web.config files reload the application’s appdomain – loses in process session state, caches, etc.

Running ASP.NET 2.0 on x64 ASP.NET 1.1 – Requires WOW64 32 bit IIS worker processes on 64 bit OS Virtual memory from 2 GB to 4 GB Enable, from %systemdrive%\Inetpub\AdminScripts, run cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 “true” ASP.NET 2.0 – Runs native 64 bit or WOW64 Virtual memory practically unlimited in native 64 bit MMC Snap-in not supported on x64

Summary Global Assembly Cache (GAC) All GAC'ed assemblies run in Full trust GAC'ed assemblies cannot be xcopy deployed ASP.NET Trust Levels (CAS Permission Sets) Full trust is not secure enough, Medium is recommended Trust levels can be customized aspnet_regiis.exe: automated deployment and management ASP.NET 2.0 MMC snap-in: provides a safe way to edit configuration writes to hierarchical and distributed web.config ASP.NET v1.1 and v2.0 run side by side on IIS 6.0

Resources ASP.NET "Whidbey" Documentation Center on MSDN ASP.NET user interface ASP.NET 2.0 Fundamentals Blog: When is ReflectionPermission needed? IIS Webcast Series: