Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using appcmd to add a new site without supplying site id?

I'm writing a batch script to deploy web sites packaged with Visual Studio 2010. In the script, I'm adding new sites as such:

appcmd add site /name:MySite /id:123

However, I don't want to specify a site id. I would just like appcmd to randomly assign one for me. But the id parameter is required for appcmd, so how do I go around about it?

like image 638
Ray Cheng Avatar asked Apr 27 '12 22:04

Ray Cheng


1 Answers

I've never known the /id param to be required - I've always used the form:

appcmd add site /name:"%appName%" /bindings:http://%appDns%:80 /physicalPath:"%mainApplicationPath%"

And never had any problems. What error is appcmd giving you when you don't specify it?

like image 77
A S Avatar answered Sep 28 '22 07:09

A S