0

I have somehow created an application directory with the appcmd command that has hidden all of my applications directory.

I can do a list of my application directories with appcmd and I think the last directory I created has the file path with a double quote character at the end, so I'm trying to delete that one application directory.

When I run the command appcmd list app I get the list of my application directories which do not show up in the UI.

Here is a list of the last three:

  • APP "Default Web Site/hotele/language90" (applicationPool:DefaultAppPool)
  • APP "Default Web Site/hotele/business900" (applicationPool:DefaultAppPool)
  • APP "Default Web Site/hotelk" (applicationPool:DefaultAppPool)

When I attempt to delete the hotelk one which is the one I think is messing up all of the directories I try running this command:

appcmd delete app "Default Web Site"/"hotelk"

It gives me this error:

message:Must use exact identifier for APP object with verb DELETE.

I've tried many different combinations of this delete syntax and not use what is meant by the identifier?

I can't delete this application directory with the IIS UI since when I go there all of my application directories do not appear.

Andrea
  • 11,801
  • 17
  • 65
  • 72

2 Answers2

0

First of all try to delete the app from Internet Information Services (IIS) Manager GUI.

If you can't find your app there you can manually edit IIS configuration file (ApplicationHost.config):

  • Go to path %windir%\system32\inetsrv\config
  • Create a backup of ApplicationHost.config file
  • Open ApplicationHost.config file
  • Search the name of the app you want to remove (ex. hotelk). You should find it in the <sites> section:

    <sites>
        <site name="Default Web Site" id="1">
            ...
        </site>
        <site name="hotelk&quot;" id="2">
            <application path="/">
                <virtualDirectory path="/" physicalPath="d:\test" />
            </application>
            <bindings>
                <binding protocol="http" bindingInformation="*:80:" />
            </bindings>
        </site>
        <siteDefaults>
            ...
        </siteDefaults>
        <applicationDefaults applicationPool="DefaultAppPool" />
        <virtualDirectoryDefaults allowSubDirConfig="true" />
    </sites>
    
  • remove the entire node containing the site you want to delete
  • save the file
Andrea
  • 11,801
  • 17
  • 65
  • 72
0

If you want delete the app using appcmd this is the right command:

appcmd delete app "Default Web Site/hotelk"
joske
  • 26
  • 3