0% found this document useful (0 votes)
8 views22 pages

Training - Session I - ASP - NET Configuration and Optimization

The document provides an overview of ASP.NET application configuration and optimization, detailing the hierarchical configuration model and how settings are inherited from various configuration files. It also discusses IIS architecture, application pools, and their configuration settings for performance, health, and identity management. Key topics include enabling ASP.NET, managing application pool recycling, and configuring application settings for security and performance.

Uploaded by

maulikshopping
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views22 pages

Training - Session I - ASP - NET Configuration and Optimization

The document provides an overview of ASP.NET application configuration and optimization, detailing the hierarchical configuration model and how settings are inherited from various configuration files. It also discusses IIS architecture, application pools, and their configuration settings for performance, health, and identity management. Key topics include enabling ASP.NET, managing application pool recycling, and configuring application settings for security and performance.

Uploaded by

maulikshopping
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 22

ASP.

NET Application
Configuration and Optimization
Agenda

ASP.NET Configuration Overview


ASP.NET Configuration Files
Hierarchical Configuration Model
Hierarchical Configuration Model - Scenario
ASP.NET Configuration How –Tos
IIS Architecture
IIS Configuration for ASP.NET
IIS Application Pools
Configuration of Application Pools
ASP.NET Configuration Overview

Apply configuration on
 All Applications
 One Application
 Sub Directories
 Individual Pages
Features to configure
 Authentication Mode
 Page Caching
 Much More….
ASP.NET Configuration Files

The configuration settings are stored in XML files with the .config
extension. Machine.config, Web.config
The configuration files are cached by the Microsoft .NET
Framework and not 'locked,‘
Settings can be configured in multiple configuration files and
propagated from server to application and from parent application
to child application.
Custom sections and settings enable us to specify our own custom
settings.
Configurations files are secure and cannot be accessed through
HTTP requests.
Hierarchical Configuration Model

Applications first inherit their settings from the machine.config file


of the server, then from the web.config file of any parent
applications, and finally from their own web.config file.
The settings in each web.config file override the settings from the
machine.config and web.config files before it.
Inheritance follows the URL of the requested resource and not
necessarily the physical structure of the files.
The settings in the machine.config file or a parent application's
web.config file can prevent settings from being overridden.
The settings can be targeted to a specific directory, application, or
file using the location setting.
Hierarchical Configuration Model Contd.
Hierarchical Configuration Model Scenario

http://www.microsoft.com/App1

http://www.microsoft.com/App1/App2.

http://www.microsoft.com/App1/SubDir

http://www.microsoft.com/App3

http://www.microsoft.com/App1/App3
Hierarchical Configuration Model Scenario

http://www.microsoft.com/App1
 Tracing disabled
http://www.microsoft.com/App1/App2.
 Tracing disabled
http://www.microsoft.com/App1/SubDir
 Tracing disabled
http://www.microsoft.com/App3
 Tracing enabled
http://www.microsoft.com/App1/App3
 Tracing disabled
ASP.NET Configuration How -TOs

Targeting Configuration Settings


• <location path="SubDir">
<system.web> <trace enabled="false" /> </system.web>
• </location>

Preventing Configuration Settings from Being


Overridden
• <system.web>
• <trace enabled="false" allowOverride="false" />
• </system.web>
IIS Architecture
IIS Architecture
IIS Configuration for ASP.NET

Enabling ASP.NET

ASP.NET IIS Install Utility


\%Sysdir%\Microsoft.NET\Framework\<version>
Aspnet_regiis -i
IIS Application Pools

Application Pool
 Isolates a group of applications under a common set of worker processes
and settings.
 Creating Application Pool
Configuration of Application Pool - Recycling
Configuration of Application Pool - Recycling

Setting Description
Recycle worker processes (in This setting specifies that the worker processes will
minutes) automatically recycle every X minutes, where X is the amount
specified in the selection box.
Recycle worker process (number This setting specifies that each worker process will be
of requests) automatically recycled after it has handled X number of
requests, where X is the number of requests specified in the
selection box.

Recycle worker processes at the This setting specifies that the worker processes will be
following times automatically recycled at the times specified in the selection
box. This is very useful if you know when to expect down time
for your application so the worker process can be recycled
without any inconvenience to users.
Maximum virtual memory (in This setting specifies that any worker process that consumes
megabytes) more virtual memory than the amount specified in the
selection box will be automatically recycled.
Maximum used memory (in This setting specifies that any worker process that consumes
megabytes) more physical memory than the amount specified in the
selection box will be automatically recycled.
Configuration of Application Pool - Performance
Configuration of Application Pool - Performance

Settings Description
Shutdown worker processes after This setting limits the number of minutes that a worker
being idle for (time in minutes) process can remain idle before it will be shut down by the
system.
Limit the kernel request queue This setting limits the number of requests that can be queued
(number of requests) for this application pool before 503 HTTP error messages are
returned to users.
Enable CPU monitoring This setting activates CPU monitoring and enables the next
three settings to be used.
Maximum CPU use (percentage) This setting specifies the maximum CPU usage allowed before
an action is taken.
Refresh CPU usage numbers (in This setting specifies the intervals at which the CPU usage
minutes) should be checked.
Action performed when CPU This setting specifies the action performed when the CPU
usage exceeds maximum CPU use usage is found to have exceeded the maximum CPU use.
Currently the only options available are No Action and
Shutdown. When Shutdown is selected, the process will be
shut down when the CPU use is exceeded.
Maximum number of worker This setting specifies the maximum number of worker
processes processes that will be created to handle this application pool.
Configuration of Application Pool - Health
Configuration of Application Pool - Health

Setting Description
Enable pinging - Ping worker This setting specifies that each worker process will be pinged
process every (frequency in every X seconds, where X is the number specified in the
seconds) selection box. This process is used to determine if a worker
process is running correctly, or if it has deadlocked.
Enable rapid-fail protection - This setting shuts down the application pool if X number of
Disable the application pool if worker processes fail in the specified amount of time. X is the
there are a certain number of value specified in the Failures setting, and the amount of time
worker process failures within a is specified in the Time Period setting. When a number of
specified time period worker processes fail in succession it is reasonable to assume
that there is a major problem on the server or with an
application.
Startup time limit - Worker This setting specifies the amount of time a worker process is
process must startup within (time given to start up before the process is terminated and another
in seconds) one is started.
Shutdown time limit - Worker This setting specifies the amount of time a worker process is
process must shutdown within given to shut down on its own before the process is
(time in seconds) terminated.
Configuration of Application Pool - Identity
Configuration of Application Pool - Identity

Identity Description
Network Service This identity is the default account. This account has limited
access rights to both the local system and the network
resources.

Local Service This identity is the lowest-level account of the built-in


accounts. This account has user rights for only the local
system, unlike the Network Service account.

Local System This identity is the highest-level account of the built-in


accounts. This account has full access to the entire system.
Open Discussion

You might also like