What does 'IISReset' do?

asp.netIisIis 6

asp.net Problem Overview


On IIS 6, what does an IIS reset do?

Please compare to recycling an app pool and stopping and starting an ASP.NET web site.

If you replace a DLL or edit/replace the web.config on an ASP.NET web site is that the same as stopping and starting that web site?

asp.net Solutions


Solution 1 - asp.net

IISReset stops and restarts the entire web server (including non-ASP.NET apps)
Recycling an app pool will only affect applications running in that app pool.
Editing the web.config in a web application only affects that web application (recycles just that app).
Editing the machine.config on the machine will recycle all app pools running.

IIS will monitor the /bin directory of your application. Whenever a change is detected in those dlls, it will recycle the app and re-load those new dlls. It also monitors the web.config & machine.config in the same way and performs the same action for the applicable apps.

Solution 2 - asp.net

IISReset restarts the entire webserver (including all associated sites). If you're just looking to reset a single ASP.NET website, you should just recycle that AppDomain.

The most common way to reset an ASP.NET website is to edit the web.config file, but you can also create an admin page with the following:

public partial class Recycle : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpRuntime.UnloadAppDomain();
    }
}

Here's a blog post I wrote with more info: Avoid IISRESET in ASP.NET Applications

Solution 3 - asp.net

It operates on the whole IIS process tree, as opposed to just your application pools.

C:\>iisreset /?

IISRESET.EXE (c) Microsoft Corp. 1998-1999

Usage:
iisreset [computername]

    /RESTART            Stop and then restart all Internet services.
    /START              Start all Internet services.
    /STOP               Stop all Internet services.
    /REBOOT             Reboot the computer.
    /REBOOTONERROR      Reboot the computer if an error occurs when starting,
                        stopping, or restarting Internet services.
    /NOFORCE            Do not forcefully terminate Internet services if
                        attempting to stop them gracefully fails.
    /TIMEOUT:val        Specify the timeout value ( in seconds ) to wait for
                        a successful stop of Internet services. On expiration
                        of this timeout the computer can be rebooted if
                        the /REBOOTONERROR parameter is specified.
                        The default value is 20s for restart, 60s for stop,
                        and 0s for reboot.
    /STATUS             Display the status of all Internet services.
    /ENABLE             Enable restarting of Internet Services
                        on the local system.
    /DISABLE            Disable restarting of Internet Services
                        on the local system.

Solution 4 - asp.net

Application Pool recycling restarts the w3wp.exe process for that application pool, hence it will only affect web sites running in that application pool.

IISReset restarts ALL w3wp.exe processes and any other IIS related service, i.e. the NNTP or FTP Service.

I think changing web.config or /bin does not recycle the whole application pool, but I'm not sure on that.

Solution 5 - asp.net

It stops and starts the services that IIS consists of.

You can think of it as closing the relevant program and starting it up again.

Solution 6 - asp.net

When you change an ASP.NET website's configuration file, it restarts the application to reflect the changes...

When you do an IIS reset, that restarts all applications running on that IIS instance.

Solution 7 - asp.net

Editing the web.config file or updating a DLL in the bin folder just recycles the worker process for that application, not the whole pool.

Solution 8 - asp.net

IISReset restarts the entire webserver (including all associated sites). If you're just looking to reset a single ASP.NET website, you should just recycle that Application Domain.

Solution 9 - asp.net

Here what's technet has to say about iisreset

> You might need to restart Internet Information Services (IIS) before certain configuration changes take effect or when applications become unavailable. Restarting IIS is the same as first stopping IIS, and then starting it again, except it is accomplished with a single command.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGuyView Question on Stackoverflow
Solution 1 - asp.nethovaView Answer on Stackoverflow
Solution 2 - asp.netJon GallowayView Answer on Stackoverflow
Solution 3 - asp.netdlamblinView Answer on Stackoverflow
Solution 4 - asp.netMichael StumView Answer on Stackoverflow
Solution 5 - asp.netLasse V. KarlsenView Answer on Stackoverflow
Solution 6 - asp.netVaibhavView Answer on Stackoverflow
Solution 7 - asp.netjonezyView Answer on Stackoverflow
Solution 8 - asp.netSouravView Answer on Stackoverflow
Solution 9 - asp.netPascal ParadisView Answer on Stackoverflow