I try to create new site:
ServerManager iisManager = new ServerManager();
Site addedSite = iisManager.Sites.Add(siteName, siteFolder, 80);
addedSite.ServerAutoStart = true;
iisManager.CommitChanges();
And it add site but I need to have in IIS binding information “test.com”
How can I add that ?
Aslo somehow added site is stopped…
You can use the following constructor to set binding information. Found from msdn
Where * is the server ip address that you would like to bind to the hostname http://www.example.com, or leave as * to catch all requests from any server ip.