Note that there are some explanatory texts on larger screens.

plurals
  1. POConnect and authenticate to SharePoint with WCF
    primarykey
    data
    text
    <p>I'm going nuts with this one and can't find any decent information ANYWHERE ..</p> <p>There is lots of info around about connecting to SharePoint 3.0 Web Services with WCF and Ntlm impersonation. However, when the client accessing the SharePoint services is remote to the SharePoint network and needs to authenticate, how does one best configure and pass credentials to the SharePoint service.</p> <p>Can I specify a windows username and password local to the SharePoint box inside the servicemodel.config .. our SharePoint instance is running as standalone outside the domain that is accessing it. Therefore impersonation is irrelevant as the domain users do not exist on the sharepoint box.</p> <p>I have tried many combinations like the following codes.. however I repeatedly get exceptions such as:</p> <p>"The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'NTLM,Basic realm="wss.internaldev.local"'.</p> <p>Can anyone provide an example of connecting to a "remote" SharePoint web service with Windows credentials?</p> <pre><code>ListsSoapClient proxy = new ListsSoapClient(); proxy.ClientCredentials.Windows.ClientCredential.UserName = "admin_user"; proxy.ClientCredentials.Windows.ClientCredential.Password = "admin_password"; proxy.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Identification; listItems = proxy.GetListItems(...); proxy.Close(); </code></pre> <p>Binding examples:</p> <pre><code>&lt;security mode="TransportCredentialOnly"&gt; &lt;transport clientCredentialType="Windows" proxyCredentialType="None" /&gt; &lt;/security&gt; </code></pre> <p>or..</p> <pre><code>&lt;security mode="TransportCredentialOnly"&gt; &lt;transport clientCredentialType="Ntlm" /&gt; &lt;/security&gt; </code></pre> <p>behaviour:</p> <pre><code>&lt;behavior name="behavior_WSS"&gt; &lt;clientCredentials&gt; &lt;windows allowedImpersonationLevel="Impersonation" allowNtlm="true" /&gt; &lt;/clientCredentials&gt; &lt;/behavior&gt; </code></pre> <p>or</p> <pre><code> &lt;windows allowedImpersonationLevel="Delegation" allowNtlm="true" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload