I want to connect to SharePont through SOAP and Claims authentification. When I try my code I got the message:

URI scheme 'http' give is not valid ; Scheme 'https' was expected.


<?xml version="1.0" encoding="utf-8" ?>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
              <binding name="ListsSoap">
                <security mode="Transport">
                  <transport clientCredentialType="Ntlm" />

          <endpoint address="http://mysharepointAdress/_vti_bin/Lists.asmx"
              binding="basicHttpBinding" bindingConfiguration="ListsSoap"
              contract="ListService.ListsSoap" name="ListsSoap"/>



       const string listName = "myList";

        var query = new XElement("Query", "");
        var viewFields = new XElement("ViewFields", "");
        var queryOptions = new XElement("QueryOptions", "");

        var client = new ListService.ListsSoapClient();
        //client.ChannelFactory.Credentials.HttpDigest.ClientCredential = new System.Net.NetworkCredential("appes", "PWD");
        var result = client.GetListItems(listName, null, query, viewFields, null, queryOptions, null);

How can I use http instead of https to get data from my site ?

Edit: Just for informations. I didn't know why I can't use http with SOAP, so I use the Rest API. It work very well !

1 Answer 1


I would strongly suggest that you use https for authentication using oauth on a live system. However if it is a development machine, you can configure it to use http.

You have to update the settings of the security token service (STS). The powershell script below should help you do that.

$c = Get-SPSecurityTokenServiceConfig

$c.AllowMetadataOverHttp = $true

$c.AllowOAuthOverHttp= $true


I would also suggest you read the following article:


  • In the production farm i can use https but not in the dev farm. I don't need to communicate between two farms, should i follow the article anyway ? I try the powershell snippet but i have the same error when i try my code.
    – Sancho
    May 30, 2014 at 13:31
  • @Sancho Yes. Please run the powershell script. You still need to configure the STS to allow authentication and metadata over http. May 30, 2014 at 13:35
  • Already run but didn't change anything
    – Sancho
    May 30, 2014 at 13:38
  • @Sancho you might have to do an IISReset. May 30, 2014 at 13:39
  • I restart iis with iisreset.exe, service manager and i try with a server reboot. But still have the error message.
    – Sancho
    May 30, 2014 at 13:44

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.