John Wu
John Wu

Reputation: 52210

How do you disable a virtual directory under IIS?

I need to disable a virtual directory on a server without disabling the rest of the virtual directories and applications running on that box.

In this case, the virtual directory I wish to disable shares a physical directory with an application that needs to stay up. For this reason, I cannot use the recommended technique of adding app_offline.htm.

Is there a flag or a setting within IIS that I can use to stop the virtual directory from using?

Upvotes: 2

Views: 5777

Answers (2)

Ankit
Ankit

Reputation: 6133

A simple solution would be to :

  • Create a new application pool similar to existing pool i.e. using same .NET CLR version and pipeline mode.
  • Then set the virtual directory's application pool to newly created app pool.
  • Finally, stop the application pool hosting your virtual directory.

For more information refer this link

Upvotes: 2

Henry
Henry

Reputation: 3013

Back up your applicationhost.config file located in c:\windows\system32\inetsrv\config

Then just right click on the virtual directory you want to remove and click remove.

When you want to restore it, just overwrite the applicationhost.config file with the backup you took.

Upvotes: 2

Related Questions