What do you mean
by recycling an Application Pool :à
ð Answer:
“An
Application Pool is, in short, a region of memory that is maintained up and
running by a process called W3WP.exe, aka Worker Process.
Recycling an Application Pool means bringing
that process down, eliminating it from memory and then originating a brand new
Worker Process, with a newly assigned process ID”
Global IIS settings changes may require
Application Pool recycle (killing and starting a new Worker Process, W3WP.exe)
2.
What do you mean
by restarting an App Domain?
ð Answer:
Restarting a App Domain means starting over a
given application with the newly added settings, such as refreshing the
existing configuration.
That happens within the boundaries of that
sub-region of memory, called AppDomain that ultimately lies within the process
associated with a respective Application Pool.
Causes of an application domain recycle
The following circumstances will cause a recycle of an
application domain:
- Modification
to web.config or Global.asax.
- Change
to the contents of the application's bin directory.
- Change
to the physical path of the virtual directory.
- Deletion
of the subdirectory of the application.
- The
number of re-compilations (aspx, ascx or asax) exceeds the limit specified
by the <compilation numRecompilesBeforeAppRestart=/> setting in
machine.config or web.config (default of 15).
3.
How to stop,
start, or restart the IIS Admin Service?
ð Answer:
You may need to stop the IIS
Admin Service when installing or updating the software. The IIS Admin
Service is used to publish websites on the machine; to avoid web outages, stop
the service at non-peak website times. This will affect all IIS-dependent
services.
1.
Click Start, Settings, Control
Panel, Administrative Tools.
2. Open Services.
3. Right-click on the IIS Admin
Service and
select Stop, Start, or Restart.
Note: If you receive an error when
manually stopping IIS, reboot the machine and
attempt to manually stop IIS again.
From a command prompt:
1. Type NET STOP
IISADMIN and
press Enter.
2. Once the service has stopped, type NET START IISADMIN and press Enter.
3. Type NET START
W3svc and press Enter.
4.
Why we need Virtual Directory?
ð Answer:
ð In actual Virtual directories are a way to access
folders which are not under the web site hierarchy.
A virtual
directory represents a web application and it points to a physical folder in
your computer.
A web
application is accessed using a virtual directory name instead of a physical
folder name.
For example, if
you have a web application called "Shopcart" in your machine, you
will have a virtual directory for this web application. You will access your web
application using the URL httP://localhost/Shopcart.
If your virtaul
directory name is "Test", then your web application url will be http://localhost/Test.
Assume you have a web
application called "Shopcart", created under the physical folder
"C:\MyProjects\Shopcart".
You can go to IIS and see this virtual directory listed. Right click on this virtual directory name in IIS and see the properties. You can see that this virtual directory is pointing to the physical location "C:\MyProjects\Shopcart".
If you have a file called "File1.aspx" under the folder "C:\MyProjects\Shopcart\", then you can access this file using Internet Explorer with the URL "http://localhost/Shopcart/File1.aspx"
You can go to IIS and see this virtual directory listed. Right click on this virtual directory name in IIS and see the properties. You can see that this virtual directory is pointing to the physical location "C:\MyProjects\Shopcart".
If you have a file called "File1.aspx" under the folder "C:\MyProjects\Shopcart\", then you can access this file using Internet Explorer with the URL "http://localhost/Shopcart/File1.aspx"
How to create a virtual
directory ?
When you create a new web project using, a new virtual directory will be
created automatically for you. This virtual directory will point to a new
folder created under C:\Inetpub\wwwroot.
If you like to better organize your projects and files in your favourite folder, you must manually create a new folder for each project in your preferred location and convert it into a virtual folder manually.
There are couple of ways you can do this.
Method 1: Open the IIS. Right click on the node "Default Web Site" and select "new Virtual Directory". When it prompt you to enter the "alias", enter the virtual directory name you want(Eg: Shopcart). In the prompt for "directory", select the folder which you want to make a virtual directory (Eg: C:\MyProjects\Shopcart). Select other default values and press "Finish". Now you should be able to see your new virtual directory in IIS.
Method 2: In the explorer, go to the folder(Eg: C:\MyProjects\Shopcart) which you want to make a "virtual directory". Right click on the folder name and select "Properties". Select the tab "Web sharing" and select teh option "Share this folder". It will prompt you with a default Alias name same as the folder name (Eg: Shopcart). Simply select the default values and press "OK".
If you like to better organize your projects and files in your favourite folder, you must manually create a new folder for each project in your preferred location and convert it into a virtual folder manually.
There are couple of ways you can do this.
Method 1: Open the IIS. Right click on the node "Default Web Site" and select "new Virtual Directory". When it prompt you to enter the "alias", enter the virtual directory name you want(Eg: Shopcart). In the prompt for "directory", select the folder which you want to make a virtual directory (Eg: C:\MyProjects\Shopcart). Select other default values and press "Finish". Now you should be able to see your new virtual directory in IIS.
Method 2: In the explorer, go to the folder(Eg: C:\MyProjects\Shopcart) which you want to make a "virtual directory". Right click on the folder name and select "Properties". Select the tab "Web sharing" and select teh option "Share this folder". It will prompt you with a default Alias name same as the folder name (Eg: Shopcart). Simply select the default values and press "OK".
5. What is an IIS Structure?
ð Answer:
IIS has 3 main components – http.sys,
IIS admin Services, and worker processes (=Application Pools).
1. HTTP.SYS:-
This is a kernel component, which means it’s not a part of user
mode processes, such as W3WP.EXE.
A kernel component never uses any virtual memory of user
processes. It’s isolated & separated.
HTTP.SYS has 3 important roles – (client) connection management,
routing requests from browsers, and managing response cache.
: Routing requests means http.sys dispatches requests
to the correct Application Pool Queue’ for each worker process.
2. Worker Processes (=Application Pools,
w3wp.exe)
W3WP(WWW Worker Process) handles all the contents, aka, static
contents, such as HTML/GIF/JPG files, and runs dynamic contents, such as ASP/ASP.NET applications.
Therefore, the status of W3WP process(=Application Pool) is critical for the
performance & stability of web applications, or web sites.
3. IIS Admin Services:-
Managing the above IIS components using IIS configurations as a
Windows Service Management(SVCHost.exe).
6. What is a command to run and see that which Worker Process’ ID is
assigned to which App Pool?
èAnswer:
C:\Windows\System32\inetsrv> %systemroot%\system32\inetsrv\APPCMD list wps
My Practical’s:
Ø How to start appcmd.exe.?
Ø We use “Iisapp.vbs” in IIS
6.0.
Answer:
Copy and paste this command in cmd: cd %windir%\system32\inetsrv
Ø How to configure the
request-processing mode for an application pool
using commands?
Answer:
- Open IIS Manager. For information about opening IIS
Manager, see Open IIS Manager (IIS 7).
- In the Connections pane, expand the
server node and click Application Pools.
- On the Application Pools page, click
to select an application pool from the list.
- In the Actions pane, click Basic
Settings.
- From the Managed pipeline mode list,
select one of the following options:
- Integrated,
if you want to use integrated IIS and ASP.NET request-processing.
- Classic,
if you want to use IIS and ASP.NET request-processing modes separately.
- Click OK.
Command Line
To configure
the managed request-processing pipeline mode for an application pool, use the
following syntax:
appcmd
set apppool /apppool.name: string /managedPipelineMode:
Integrated|Classic
The
variable string is the name of the application pool that
you want to change, and the value that you specify for managedPipelineMode is the mode that IIS uses to process
requests for managed code.
For
example, to configure an application pool named Marketing to use Classic mode, type the following at the command
prompt, and then press Enter:
appcmd
set apppool /apppool.name: Marketing /managedPipelineMode:Classic
No comments:
Post a Comment