Le schéma d'URI fourni 'https' n'est pas valide; "http" attendu lors de l'appel du service Web

Je suis en train d'appeler un service web SharePoint à partir d'un CRM flux de travail à l'aide personnalisée de code C#. Cependant, quand je lance mon code, j'obtiens l'erreur suivante:

The provided URI scheme 'https' is invalid; expected 'http'.
Parameter name: via

Voici le code fautif:

#region Set up security binding and service endpoint
BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.Ntlm;
EndpointAddress endpoint = new EndpointAddress(endpointAddress);
#endregion

#region Create the client and supply appropriate credentials
CopySPContents.CopyService.SharepointFileServiceClient client = new CopySPContents.CopyService.SharepointFileServiceClient(binding, endpoint);              
client.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;              
#endregion

#region Call the web service and trace its response
String response = client.CopyFolderContentsAcrossSites(sourceSiteURL, sourceFolderURL, destinationSiteURL, destinationFolderURL);
#endregion

L'erreur est lancée sur la ligne String response = client.CopyFolderContentsAcrossSites(sourceSiteURL, sourceFolderURL, destinationSiteURL, destinationFolderURL); où le client de la méthode est appelée.

Merci pour toute aide,
Scott

source d'informationauteur Scott