因爲VS在開發WEB應用程序時,每次都須要從新啓動IIS Express,速度太慢了,若是改成手動控制IIS Express啓動,那麼能夠直接編譯應用程序後,直接刷新頁面,那麼速度會更快。app
所以須要經常使用的兩個命令爲:網站
appcmd list site:列出IIS Express中包含的全部網站;命令行
運行結果爲:開發
C:\Users\Rising X>appcmd list site
SITE "WebSite1" (id:1,bindings:http/:8080:localhost,state:Unknown)
SITE "MVC5Demo" (id:2,bindings:http/*:12834:localhost,state:Unknown)
SITE "UserLimitMVC.UI.Portal" (id:3,bindings:http/*:15118:localhost,state:Unknow
n)
SITE "Admin" (id:4,bindings:http/*:28628:localhost,state:Unknown)
SITE "App.Admin" (id:5,bindings:http/*:1332:localhost,state:Unknown)
SITE "Company.Project1.Server.Host" (id:6,bindings:http/*:5000:localhost,state:U
nknown)
SITE "NtEfApp.Server.Host" (id:7,bindings:http/*:2452:localhost,state:Unknown)
SITE "AccountAtAGlance" (id:8,bindings:http/*:22764:localhost,state:Unknown)
SITE "langsinERP" (id:9,bindings:http/*:13253:localhost,state:Unknown)
SITE "AngularDemo" (id:10,bindings:http/*:20555:localhost,state:Unknown)
SITE "WebAPIDemo1" (id:11,bindings:http/*:21023:localhost,state:Unknown)
SITE "WebAPI" (id:12,bindings:http/*:4115:localhost,state:Unknown)
SITE "WebApplication1" (id:13,bindings:http/*:25974:localhost,state:Unknown)
SITE "RightMng" (id:14,bindings:http/*:27057:localhost,state:Unknown)cmd
其中id:序號,對應的爲應用程序的序號。it
2.IISExpress /siteid:序號 ,此命令啓動指定序號的應用程序,那麼此應用程序則將一直在運行。io
爲了能使命令行窗口中能夠直接使用此兩命令,須要把IIS Express所在的文件夾路徑添加到系統的路徑參數中。編譯