Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

The service is hosted in /_vti_bin, and uses SharePoint's own BasicHttpBinding service host factory (MultipleBaseAddressBasicHttpBindingServiceHostFactory). According to Microsoft's guidance, three endpoints should be generated, such as one for NTLM authentication.

My service client is hosted on another webpage. It instantiates a new BasicHttpBinding with all the proper values set for NTLM to be used (I've even tried username/password with NetworkCredentials to rule out any kerberos / double hop issues, to no avail). No matter how I go about it, the service never poses a 401 challenge, and the client is therefore never authenticated.

This is driving me completely bonkers, as there are few notes on this out on the web. It doesn't seem to me like BasicHttpBinding services are even supposed to work with SharePoint Claims, as the WIF implementation goes to great lengths to surpress 401 challenges internally.

Please help?

share|improve this question
add comment

1 Answer 1

If you are still having problems with this, can you add the client-side WCF configuration? I ran into this problem when first deploying my own custom WCF services within SharePoint, and found that if I used the out-of-the-box svcutil command to generate my proxies and configuration that it would default the proxy configuration to not use the NTLM-style endpoint. The result was I had to trim and make minor tweaks to my WCF client configuration in order to get it to work. The result looks as follows:

<system.serviceModel>
  <bindings>
    <basicHttpBinding>
      <binding name="BasicHttpBinding_MyServices" closeTimeout="00:01:00"
        openTimeout="00:01:00" receiveTimeout="00:01:00" sendTimeout="00:01:00"
        allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
        maxBufferSize="200524288" maxBufferPoolSize="200524288" maxReceivedMessageSize="200524288"
        messageEndoding="Text" textEncoding="utf-8" transferMode="Buffered"
        useDefaultWebProxy="true">
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" />
        <security mode="TransportWithCredential">
          <transport clientCredentialType="Ntlm" proxyCredentialType="None" realm="" />
          <message clientCredentialType="UserName" algorithmSuite="Default" />
        </security>
    </basicHttpBinding>
  </bindings>
  <client>
    <endpoint address="http://myserver/_vti_bin/My.Services/Service.svc"
      binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_MyServices"
      contract="My.Services.IService"
      name="IService_Dev" />
  </client>
</system.serviceModel>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.