4

I'm using appcmd to script a site I am deploying. At the start of this I am trying to remove some sites that are automatically installed by a vendor's site. They need to be removed because they are set up incorrectly putting to a non-existent part of the disk.

The command I am using that is failing is as follows:

C:\Windows\System32\inetsrv>appcmd delete app "AccessViaWeb(80)/AVInclude"  

ERROR ( message:Must use exact identifer for APP object with verb DELETE. )

I can't figure out the syntax require to avoid this error.

The list of apps on this server can be seen by the appcmd list apps command:

C:\Windows\System32\inetsrv>appcmd list apps  
APP "Default Web Site/" (applicationPool:DefaultAppPool)  
APP "Default Web Site/OPCService" (applicationPool:DefaultAppPool)  
APP "PeopleFinder - 8010/" (applicationPool:PeopleFinder - 8010)  
APP "AccessViaWeb(80)/" (applicationPool:DefaultAppPool)  
APP "AccessViaWeb(80)/AVInclude" (applicationPool:AccessViaWeb)  
APP "AccessViaWeb(80)/AccessViaPrint" (applicationPool:AccessViaPrint)  
APP "AccessViaWeb(80)/SignFunctionService" (applicationPool:SignFunctionService)  
Werner
  • 14,324
  • 7
  • 55
  • 77
user3299213
  • 41
  • 1
  • 3

3 Answers3

2

Adding extra quotes solved this issue for me!

I had an application (Inventory) within another application (Portal):

 C:\Windows\System32\inetsrv>appcmd delete APP "WebSite/Portal/Inventory" /debug
 ERROR ( message:Must use exact identifer for APP object with verb DELETE. )

Modifying the command as follows fixed the issue:

 appcmd delete APP "Website"/"Portal"/"Inventory"
BernardV
  • 1,700
  • 20
  • 15
  • Unfortunately that didn't help in my case. The app is listed in the output of "appcmd list apps". Moreover I get similar error when I try to delete virtual directory for this app: "Must use exact identifer for VDIR object with verb DELETE". If I remove app from the GUI I can delete virtual directory from command line... HELP! I'm using "appcmd DELETE APP /app.name:base/console.io" to delete app and "appcmd DELETE VDIR /vdir.name:base/console.io" to delete virtual directory. – op1ekun Mar 04 '15 at 17:49
1

This occur if there are 2 objects with the same ID. A VDIR and a APP. We have solve this only via IIS GUI and not via API.

Horcrux7
  • 23,758
  • 21
  • 98
  • 156
0

You sometimes get an error 50 (ERROR_NOT_SUPPORTED) and the error message

ERROR ( message:Must use exact identifer for APP object with verb DELETE. )

if the app you want to delete does not exist. The same command will succeed if the app does exist. So you can treat the error codes

  • 50 (ERROR_NOT_SUPPORTED)
  • 1168 (ERROR_NOT_FOUND)

as success.

This seems to be a bug in appcmd, as it doesn't make sense.

Florian Winter
  • 4,750
  • 1
  • 44
  • 69