I am trying to create a Virtual Directory progeammatically using the below code:
ServerManager iisManager = new ServerManager();
iisManager.Sites.Add("NewSite", "http", "*:8080:", @"D:\mine\TestApps\TestAppXML");
iisManager.CommitChanges();
this code is working fine when using through Console application. but when I am using the same code through Web Application, it is not doing the desired job. Nor does it give any error. Anyone has ideas about why the same code is not working with Web Application?