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?
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:
<application ...>
XML node.<application ...>
node(s) of all your phantom applications.That worked for me, if it does not work for you, please post a comment here. A good help was this posting on the IIS forum.
Please be also aware that when editing the "applicationHost.config" file directly in its original location, you need to use a 64-bit editor (e.g. Notepad++ 64-bit), because otherwise it would get stored in "C:\Windows\SysWOW64\inetsrv\Config" instead of the correct location.
This is probably safer and simpler than editing applicationHost.config.
There is an easy way to fix this.
Child applications aren't automatically deleted and the IIS Manager can't display them in the tree, so that's your problem...
A quick and robust way is to use a PowerShell script to get all applications, test whether the physical path still exists and if not, delete the application:
Much more simple:
Why not edit MetaBase.xml directly? Of course, back it up before that.
Or create a "temp" pool, move all other apps there, remove the orig pool, and rename (if needed) the new pool.
I did a combination of two answers listed above since I did not want to tinker applicationHost.config manually.
Step 1 - Create a temporary app pool - let's say "temp".
Step 2 - Move all the phantom applications to this temp app pool.
Step 3 - Use Powershell from one of the answers above -
Voila!