Delivering Excellence in Software Engineering ® 2006. EPAM Systems. All rights reserved. Configuration.

Slides:



Advertisements
Similar presentations
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
Advertisements

IIS v7.0 Martin Parry Developer & Platform Group Microsoft Limited
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Building Applications using ASP.NET and C# / Session 14 / 1 of 18 Session 14.
3.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 3: Introducing Active Directory.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
IT533 Lectures Configuring, Deploying, Tracing and Error Handling.
Delivering Excellence in Software Engineering ® EPAM Systems. All rights reserved. ASP.NET Authentication.
Edwin Sarmiento Microsoft MVP – Windows Server System Senior Systems Engineer/Database Administrator Fujitsu Asia Pte Ltd
A Close Look Inside the SharePoint Engine Randy Williams, MVP MOSS Synergy Corporate Technologies
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Integrating CFML with ASP.NET Vince Bonfanti President New Atlanta Communications, LLC.
MCSE Guide to Microsoft Exchange Server 2003 Administration Chapter Four Configuring Outlook and Outlook Web Access.
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University.
IT533 Lectures Session Management in ASP.NET. Session Tracking 2 Personalization Personalization makes it possible for e-businesses to communicate effectively.
ASP.NET 2.0 Chapter 5 Advanced Web Controls. ASP.NET 2.0, Third Edition2 Objectives.
Advanced Web Forms with Databases Programming Right from the Start with Visual Basic.NET 1/e 13.
Session 10: Managing State. Overview State Management Types of State Management Server-Side State Management Client-Side State Management The Global.asax.
DEV402 Extending the ASP.NET Runtime Jurgen Postelmans Microsoft Regional Director BeLux U2U.
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 Web services and security ---discuss different ways to enforce security Presenter: Han, Xue.
Database-Driven Web Sites, Second Edition1 Chapter 5 WEB SERVERS.
.NET Framework Danish Sami UG Lead.NetFoundry
Chapter 8 Cookies And Security JavaScript, Third Edition.
Module 5 Configuring Authentication. Module Overview Lesson 1: Understanding Classic SharePoint Authentication Providers Lesson 2: Understanding Federated.
Dr. Mustafa Cem Kasapbaşı Security in ASP.NET. Determining Security Requirements Restricted File Types.
1 CS 3870/CS 5870 Note04 Session Variables and Post Back.
Efficient Deployment & Management of ASP.NET 2.0 Applications on IIS 6.0 Alexis Eller Program Manager Internet Information Services Microsoft Corporation.
The.NET Runtime and IIS Presented by Chris Dickey – cdickey.net consulting
ASP.NET State Management. Slide 2 Lecture Overview Client state management options Cookies Server state management options Application state Session state.
STATE MANAGEMENT.  Web Applications are based on stateless HTTP protocol which does not retain any information about user requests  The concept of state.
Slide 1 ASP Authentication There are basically three authentication modes Windows Passport Forms There are others through WCF You choose an authentication.
Module 7: Creating a Microsoft ASP.NET Web Application.
Reset and Recycle IIS Reset Application Pool Management Error Codes New HTTP Sub-status codes Custom/Detailed Errors Tracing in IIS7 and.
ASP.NET Architecture Internals Mike Shaw Developer & Platform Group Microsoft Ltd.
This is the main tracing and diagnostics presentation. Very important that this be practical and useful information. IT Pro audience is very.
ASP.Net, Web Forms and Web Controls 1 Outline Session Tracking Cookies Session Tracking with HttpSessionState.
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.
Creating and Managing Digital Certificates Chapter Eleven.
What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services  Extensible Output Caching  Shrinking Session State  Performance Monitoring  Permanently.
Module 3: Managing Web Applications with IIS 7.0.
Module 4: Design IIS Maintenance and UDDI. Designing Internet Information Services Backup and Recovery Specifying Monitoring requirements Deploying UDDI.
Understanding Web Applications Lesson 4. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understanding Web Page Development Understand Web.
ASP.NET P AGE O BJECTS.  Each ASP.NET page inherits the PAGE object  The PAGE supplies 3 built in objects:  REQUEST: All information passed to the.
Configuring and Deploying Web Applications Lesson 7.
.NET Mobile Application Development XML Web Services.
IIS Manager Details Delegated Administration Configuration System.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Web Parts Overview Web parts in SharePoint 2007 “Hello World” web part Typical deployment.
Personalizing Web Sites Nasrullah. Understanding Profile The ASP.NET application service that enables you to store and retrieve information about users.
Shibboleth 1.2 Technical Overview “So you thought 1.1 was complicated…” Scott Cantor The Ohio State University and Internet2 Scott Cantor.
Delivering Excellence in Software Engineering ® EPAM Systems. All rights reserved. Reflection and Attributes.
Alexey Polovinkin Post graduate student, CMC department.
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
DEV410 Inside the ASP.NET Runtime - Intercepting HTTP Requests Michele Leroux Bustamante Principal Software Architect IDesign Inc.
Fundamentals of Web DevelopmentRandy Connolly and Ricardo HoarFundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentRandy.
Managing State Chapter 13.
Efficient Deployment & Management of ASP. NET 2
Lesson 4: Configuring File and Share Access
Session Variables and Post Back
ASP.NET Web Configuration File
ASP.NET Application Framework
Configuring Internet-related services
IIS v7.0 Martin Parry Developer & Platform Group Microsoft Limited
Created by Atif Aziz. ELMAH means is "Error Logging Modules and Handlers". It is an application-wide error logging facility that is completely pluggable.
Concepts in ASP.NET Core App
ASP.NET Core Middleware Fundamentals
Presentation transcript:

Delivering Excellence in Software Engineering ® EPAM Systems. All rights reserved. Configuration

® EPAM Systems. All rights reserved. Configuring ASP.NET ASP.NET is configured via an extensible configuration file format –ASP.NET configuration controlled using an XML file named web.config –Typically located at the top-level of the virtual root directory –ASP.NET configuration happens post-IIS metabase web.config

® EPAM Systems. All rights reserved. ElementPurpose Specify the client authentication mode to use Allow or deny users or roles access Specify browser capabilities based on user agent Define client targets Control page compilation and assembly references Control error page display and define custom error pages Set the request and response encoding Add or remove HTTP handlers Add or remove HTTP modules Control aspects of HTTP request processing Specify impersonation for this application Control the validation and decryption key Set defaults for page attributes globally Control the behavior of the worker process Define trust levels with associated policy files Control session state Enable application-wide tracing Select which trust level to use Specify web service protocols and extensions Add application-specific data elements Top-level configuration elements available in web.config

® EPAM Systems. All rights reserved. Hierarchical file layout Configuration files for ASP.NET can be in one of 4 places: –machine –site –application –subdirectory Configuration settings are applied hierarchically –Root machine.config file in.NET installation directory is applied first –Any web.config file in the site directory is applied next –The web.config file at the root of the virtual directory is applied next –Any web.config files found in sub-directories under the virtual root are applied last

® EPAM Systems. All rights reserved. Hierarchy of configuration files

® EPAM Systems. All rights reserved. Cumulative configuration example

® EPAM Systems. All rights reserved. Location element Location element can be used to apply settings to specific files or subdirectories from a top-level configuration file –Sometimes preferable to spreading web.config files throughout your directory structure –Specify a named path and configuration settings to apply web.config

® EPAM Systems. All rights reserved. Element Placement Some elements are restricted in where they can be applied –Elements that cannot be applied at the subdirectory level include authentication sessionState trust httpModules (do not take effect) –The processModel element can only occur in machine.config

® EPAM Systems. All rights reserved. Impact of configuration changes Any change to an application's web.config file will restart that application –its application domain will be unloaded and re-created –any in-process state will be lost (session, application, etc.)

® EPAM Systems. All rights reserved. Configuration Data Custom application configuration data may be stored in web.config and accessed via static property accessors –Ideal place to store DSN or other global settings that may need to be changed at deployment –The appSettings element in the web.config file supports adding key/value pairs that can be retrieved from within an application at runtime –The value of a key is retrieved through the Context.GetConfig() method of the HttpContext class, or through the ConfigurationSettings.AppSettings property

® EPAM Systems. All rights reserved. Accessing configuration data using static property accessors <add key="DSN" value="server=.;trusted_connection=yes;database=test"/> web.config public void Page_Load(object src, EventArgs e) { string dsn = ConfigurationSettings.AppSettings["DSN“]; // use dsn here } somepage.aspx

® EPAM Systems. All rights reserved. Process model configuration The lifetime of the aspnet_wp.exe worker process (IIS 5) is configurable –aspnet_isapi.dll reads the processModel configuration section in global machine.config file –Each worker process used to service unlimited requests by default In IIS 6 the worker process w3wp.exe can be controlled per application pool –processModel element ignored –settings drawn from metabase.xml

® EPAM Systems. All rights reserved. Limiting worker process usage Lifetime of worker process can be limited by several factors –Total lifetime of process –Total time idle –Number of requests –Amount of memory consumed –When limit is reached, process is replaced with a new instance –New requests queued to new process –Old process handles pending requests before shutting down

® EPAM Systems. All rights reserved. <processModel enable="true" timeout="Infinite" idleTimeout="Infinite" shutdownTimeout="0:00:05" requestLimit="Infinite" requestQueueLimit="5000" restartQueueLimit="10" memoryLimit="60" webGarden="false" cpuMask="0xffffffff" userName="MACHINE" password="AutoGenerate" logLevel="Errors" clientConnectedCheck="0:00:05" comAuthenticationLevel="Connect" comImpersonationLevel="Impersonate"/> processModel element in machine.config (IIS 5)

® EPAM Systems. All rights reserved. Application pool properties in metabase.xml (IIS 6)

® EPAM Systems. All rights reserved. Referencing GAC Assemblies To add a reference to an assembly deployed in the GAC –Use the assemblies element with an add sub-element <add assembly="util, Version= , Culture=neutral, PublicKeyToken=a77a5c561934e089" />

® EPAM Systems. All rights reserved. Configuration file extensibility Configuration files are divided into two distinct sections –The configuration section handlers Contains classes that parse specific sub-sections of the data portion of the file –The configuration data Contains data parsed by the configuration section handlers

® EPAM Systems. All rights reserved. configuration section handlers in machine.config

® EPAM Systems. All rights reserved. Building custom configuration section handlers You can build your own configuration section handlers –Useful if appSettings element is not sufficient –Create a class that implements IConfigurationSectionHandler –Define a class/struct to store the configuration data –Read the incoming XML in Create() and return a reference to the configuration structure –Install the handler by adding it to the configSections element public interface IConfigurationSectionHandler { object Create(object parent, object input, XmlNode node); }

® EPAM Systems. All rights reserved. Leveraging NameValueFileSectionHandler NameValueFileSectionHandler can be used to define generic configuration sections with name/value pairs –Lets you define a custom section without going to the trouble of building your own custom class <section name="myGroup" type="System.Configuration.NameValueFileSectionHandler, System, Version= , Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

® EPAM Systems. All rights reserved. Accessing custom configuration section using NameValueFileSectionHandler protected void Page_Load(object src, EventArgs e) { NameValueCollection set; set = ConfigurationSettings.GetConfig("myGroup") as NameValueCollection; // use set here (like set["font"], // set["verticalWidth"], etc. }

® EPAM Systems. All rights reserved. Summary ASP.NET applications are configured through web.config files web.config files store configuration settings in an extensible XML format Static application data can be stored and retrieved in web.config files processModel controls lifetime and properties of ASP.NET process configuration files are extensible

Delivering Excellence in Software Engineering ® EPAM Systems. All rights reserved. For more information, please contact: Uladzimir Tsikhon Software Engineering Manager, Belarus Recourse Development Department EPAM Systems, Inc. Belarus, Minsk Phone: +375(17) ext 1756 Fax: +375(17)