iis-7.5

IIS 7.5 - How to remove the remaining folder when you Remove Application


I have an application under a website. I'm testing a deploy/redeploy procedure. So I want to remove the application and let the deploy procedure re-add it later.

When I right-click and select "Remove Application" the icon that shows an application goes away, but a regular looking folder icon remains.

  1. Is that left over a Virtual Directory?
  2. Why isn't there a right-click "Remove" for it, or why doesn't it remove when I removed the Application?
  3. How do I remove it?

Since posting the above, I found: right-click "Deploy" then "Delete Folder and Content". But couldn't you just delete the "connection" between IIS and the folder without actually deleting that folder?


Solution

  • Here's what I was missing. Once you associate a website to a path on the disk, the IIS tree view will always show all folders (if you press do a F5 or right-click then "Refresh"). In other words, if you add a folder to the disk, and refresh, you will see the folder there regardless of whether it is an application or virtual directory.

    In my case, I created a new app, and tied it to a new folder. Thus when I removed the app, the folder was still there. Had I created the new folder and done a refesh, I would have seen the folder there before doing a "Convert to Application".

    There is an option to right click, select "Deploy" then "Delete folder and content", in which case the directory on the disk is deleted. This should obviously be used with caution.

    enter image description here