Pregunta

Estoy utilizando el código siguiente para iniciar el sitio web cuando se detiene.

DirectoryEntry DE = new DirectoryEntry(string.Format("IIS://localhost/W3SVC/{0}", siteID));
if ((Int32)DE.InvokeGet("ServerState") != MD_SERVER_STATE_STARTED)
     DE.Invoke("Start");

Pero sólo funciona si el sitio está parada y no funciona si está en pausa. ¿Cómo puedo empezar el sitio web si está en el estado de pausa?

¿Fue útil?

Solución

Para reanudar un sitio desde el estado Paused debe invocar el método Continue.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top