none
UnForbidden Error when calling Copy.asmx Service

    Question

  • Hi All,

    I am trying to call the copy.asmx service hosted in SharePoint Online from an on-premise server, trying to use basic Authentication with an Azure AD account who is the Site Owner but get this error.

    The HTTP request was forbidden with client authentication scheme 'Basic'.

    {"The remote server returned an error: (403) Forbidden."}

    Here's the configuration of the service on the client.

              <basicHttpBinding>
                    <binding name="CopySoap" proxyAddress = "http://proxy-server:8080" useDefaultWebProxy="False">
                      <security mode="Transport">
                        <transport clientCredentialType="Basic" proxyCredentialType="None" realm="" />
                      </security>
                    </binding>                
                </basicHttpBinding>

            <client>
                <endpoint address="https://server.com/_vti_bin/copy.asmx"                      
                    binding="basicHttpBinding" bindingConfiguration="CopySoap"
                    contract="CopyWS.CopySoap" name="CopySoap" />
            </client>

    and then assign the credentials (user/pwd) in the code but it doesn't work. I am able to access the site using these credentials from the browser, any help welcomed.

    Regards

    Syed


    Wednesday, June 15, 2016 1:19 AM