Connect-SPOService : Method not found: ‘Boolean System.Net.WebResponse.get_SupportsHeaders()’.

I have successfully installed the SharePoint Online Management Shell in my Windows 2008 R2 Server machine and successfully loaded the SharePoint Online Powershell module by using below command.

Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking

But when I try to connect Sharepoint Online service by using the command Connect-SPOService, I am getting the error Connect-SPOService : Method not found: ‘Boolean System.Net.WebResponse.get_SupportsHeaders()’.

Connect-SPOService -Url https://mytanant-admin.sharepoint.com/ -Credential (Get-Credential)

Receiving below error:

Connect-SPOService : Method not found: 'Boolean System.Net.WebResponse.get_SupportsHeaders()'.
At line:1 char:1
+ Connect-SPOService -Url https://mytanant-admin.sharepoint.com/ -Credential $PSCred ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo          : NotSpecified: (:) [Connect-SPOService], MissingMethodException
  + FullyQualifiedErrorId : System.MissingMethodException,Microsoft.Online.SharePoint.PowerShell.ConnectSPOService

Fix/Solution:

For me the problem is due to .NET Framework. In my machine, I have already installed .NET 4.0 before installing SharePoint Online Management Shell. But the SharePoint Online Management Shell is developed over .NET 4.5, so the problem was solved after installing .NET Framework 4.5 in my server.

Advertisement

1 thought on “Connect-SPOService : Method not found: ‘Boolean System.Net.WebResponse.get_SupportsHeaders()’.”

Leave a Comment