I'm using the following code to start website when it is stopped.
DirectoryEntry DE = new DirectoryEntry(string.Format("IIS://localhost/W3SVC/{0}", siteID));
if ((Int32)DE.InvokeGet("ServerState") != MD_SERVER_STATE_STARTED)
DE.Invoke("Start");
But it works only if the website is stopped and not works if it is PAUSED. How can i start the website if it is in the PAUSED state?
要从“ Paused
状态恢复站点,应调用Continue
方法。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.