0

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?

1 Answer 1

0

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.

17
  • 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
    Commented May 29, 2014 at 15:20
  • Are you getting anything in $webservice? you can try with $webservice = [System.Type]::GetType("Microsoft.SharePoint.Administration.SPIisWebServiceSettings, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") . confirm the PublicKeyToken from GAC
    – Aanchal
    Commented May 29, 2014 at 15:33
  • how do i check if i am getting anything in $webservice? i tried with altering from 14.0.0.0 to 15.0.0.0 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
    Commented May 29, 2014 at 15:44
  • Add-PSSnapin "microsoft.Sharepoint.Powershell" $webservice = [system.Type]::GetType("Microsoft.Sharepoint.Administration.SPIisWebServiceSettings, Microsoft.Sharepoint, Verstion=15.0.0.0, 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
    Commented May 29, 2014 at 15:47
  • Are you running this under admin privileges?
    – Aanchal
    Commented May 29, 2014 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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