# Removing phantom applications from Application Pools in IIS7

I have an application in one of my application pools that has a virtual path of '/Site/login.aspx'. I want to remove it but it no longer exists on my computer and it's causing me issues setting up AppFabric.

I understand that you can remove these phantom applications by recreating the application in IIS and then hitting Remove. That will get rid of the application from the pool but in this case I can't recreate the application due to the /login.aspx in the virtual path

Any ideas how I remove this erroneous entry?

Thanks

-

Since I had the same issue; application pools with applications that did not exist anymore, I did some research and finally managed to solve the issue.

Here are some steps:

1. Locate and edit your IIS 7 configuration file "applicationHost.config" with a text editor. It should be stored in "C:\windows\system32\inetsrv\config" Since the folder is somehow "protected", I usually edit like the following:
1. Open Windows Explorer
2. Navigate to "C:\windows\system32\inetsrv\config"
3. Copy the file "applicationHost.config"
4. Paste it to a folder where you can edit it, e.g. your Desktop
5. Open it with your editor of choise and edit it
6. Copy it back with Windows Explorer to "C:\windows\system32\inetsrv\config"
2. Make a backup of your "applicationHost.config" file!
3. Search with a text editor in your "applicationHost.config" for your non-existing applications. They should be located somewhere inside an <application ...> XML node.
4. Delete the <application ...> node(s) of all your phantom applications.
5. Save the file and copy it back to "C:\windows\system32\inetsrv\config"
6. Refresh the IIS management console. Your application pools should now be without the phantom applications you previously deleted.
7. Actually remove the now empty application pool.