I'm trying to set the application pool for a site via appcmd
.
I add a pool:
appcmd add apppool /name:"TestAppPool" /managedPipelineMode:Classic
I add a site:
appcmd add site /name:"MyTestSite" /physicalPath:C:\MyTestSite
Then I set a pool for this site:
appcmd set site /site.name:"MyTestSite" /[path='C:\MyTestSite'].applicationPool:TestAppPool
Here I get an error:
ERROR ( message:Cannot find requested collection element. )
What's wrong here?
Got it working with this:
appcmd add site /name:"MyTestSite" /bindings:"http/*:81:" /physicalPath:c:\MyTestSite
appcmd set site /site.name:"MyTestSite" /[path='/'].applicationPool:TestAppPool