I am trying to stop a website in IIS.
Here is my code
Site oSite = SERVERMANAGER.Sites.FirstOrDefault(s => s.Name.IndexOf(websiteName) > -1);
if (oSite != null)
{
//stop the site...
oSite.Stop();
}
When it reachers oSite.Stop(); it will throw
"The method or operation is not implemented."
I am using Windows 7 Home Premium and the version of IIS I'm using is 7.5.
Any idea how to solve this error?