ClientCredentials - client credentials are required
using (ListsSoapClient proxy = new ListsSoapClient())
{
proxy.ClientCredentials.Windows.ClientCredential = new NetworkCredential();
...
}
Web.config or app.config - NTLM required
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="ListsSoap" maxReceivedMessageSize="9999999">
<readerQuotas maxBytesPerRead="9999999"/>
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://corporate-portal.ccc/_vti_bin/Lists.asmx" binding="basicHttpBinding" bindingConfiguration="ListsSoap" contract="SPLists.ListsSoap" name="ListsSoap"/>
</client>
</system.serviceModel>
No comments:
Post a Comment