IIS - Create Application and Set Application Pool (C#) (edit)
Chú ý:
+ Mở Visual Studio 2017 với quyền Administrator
+ Cài đặt Web Management Tools
Input
+ Tên Root Application: MyAppPool
+ Tên Application: MyApp
+ Tên Customer: 4000
Output
+ Tạo Application nếu chưa tồn tại.
+ Sử dụng XCopy để copy toàn bộ files từ một nguồn cho trước đến Physical Path của Application vừa tạo.
+ Hoặc Unzip từ một nguồn là 1 file .zip cho trước.
+ Set ApplicationPool trùng với ApplicationPool của Root Application.
Tham khảo
Sử dụng thư viện Microsoft.Web.Administration.dll
Sử dụng thư viện System.IO.Compression.dll và System.IO.Compression.FileSystem.dll
1) https://forums.iis.net/t/1207235.aspx?How+to+convert+a+physical+folder+into+an+Asp+NET+Application+using+Microsoft+Web+Administration+C+API
2) https://stackoverflow.com/questions/3228813/how-to-get-websites-physical-path-on-local-iis-server-from-a-desktop-app
3) http://www.anotherchris.net/csharp/6-ways-to-get-the-current-directory-in-csharp/
4) https://dailydotnettips.com/different-ways-of-getting-path/
5) https://www.c-sharpcorner.com/UploadFile/jawedmd/xcopy-using-C-Sharp-to-copy-filesfolders/
6) https://stackoverflow.com/questions/32236796/fastest-way-to-copy-files-from-one-directory-to-another (có sử dụng dữ liệu trong Database và Sql Server Connection)
https://www.c-sharpcorner.com/UploadFile/satisharveti/programmatically-create-iis-website-and-application-pool-usi/
https://stackoverflow.com/questions/16417578/iis-application-creation-by-using-microsoft-web-administration-library-creates-t
https://www.c-sharpcorner.com/UploadFile/225740/introduction-to-application-pool-in-iis/
https://stackoverflow.com/questions/12147721/change-apppool-of-application-programatically