I have a application that I would like to deploy programmatically with C# to IIS with default settings. Basically I would like to do what is in the screen shot below on a button click. Any help or guidance on this would be great.
This solved it for me. I was missing the
using Microsoft.Web.Administration;
ServerManager web = new ServerManager();
web.Sites["Default Web Site"].Applications.Add("/Web", Drive + "/Portal/Web");
web.Sites["Default Web Site"].Applications.Add("/WebAPI", Drive + "/Portal/WebAPI");
web.CommitChanges();