In my SharePoint environment the site "SharePoint Web Service" site is missing from IIS Sites list, is there a way to recreate it?

I have seen a guide on here but it seems to be for SharePoint 2010. Is there a guide for SharePoint 2013? Or what code would I need to change from the 2010 guide?


I think the same is applicable to Sharepoint 2013. According to this article

You can test it in your machine. and you mighthave to change assembly version of Sharepoint dlls.

  • hello thank you for the reply, its similar to the guide i have tired when i run the code on my server powershell returns "you cannot call a method on a null-valued expression" relating to this line. $Method = $webservice.GetMethod("ProvisionLocal", "Instance, NonPublic", $null, @(), $null)
    – Gordon
    May 29 '14 at 15:20
  • Are you getting anything in $webservice? you can try with $webservice = [System.Type]::GetType("Microsoft.SharePoint.Administration.SPIisWebServiceSettings, Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c") . confirm the PublicKeyToken from GAC
    – Aanchal
    May 29 '14 at 15:33
  • how do i check if i am getting anything in $webservice? i tried with altering from to and have got my PublicKeyToken From the C:\windows\assembly\GAC folder but still returns the error You Cannot Call a method on a null-valued expression
    – Gordon
    May 29 '14 at 15:44
  • Add-PSSnapin "microsoft.Sharepoint.Powershell" $webservice = [system.Type]::GetType("Microsoft.Sharepoint.Administration.SPIisWebServiceSettings, Microsoft.Sharepoint, Verstion=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") $instance = $webservice::Default $method = $webservice.GetMethod("ProvisionLocal", "instance, NonPublic", $null, @(), $null) $method.invoke($instance, $null) $method = $webservice.GetMethod("Provision", "instance, Public", $null, @(), $null) $method.invoke($instance, $null)
    – Gordon
    May 29 '14 at 15:47
  • Are you running this under admin privileges?
    – Aanchal
    May 29 '14 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.