by Mark Shiffer
8/4/2008 8:52:00 AM
I recently received this error when programmatically attempting to delete an application pool in IIS. Upon examination of IIS, the system thought the application pool was assigned to a virtual directory that no longer existed. I tried to delete the application pool manually in IIS and received a similar error (worded differently though). I searched through all of the virtual directories on the server and did not find any that were referencing the application pool. Still, IIS was showing the application pool as being assigned to a virtual directory. To get around this, I created a virtual directory with the name that it thought it was already assigned to and assigned the application pool to that new virtual directory. I then unassigned the application pool and was able to delete it. Odd...