none
2010 PSI Extension Service with Claims/Multi-Authentication RRS feed

  • Question

  • Hi,

    I build a simple PSI Extension which works just fine when accessed via "classic" web app url. When I try to access it via a claims/multi-auth (windows/forms) web app url, I get the following:

    System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate,NTLM'. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.

    The server is configured with Kerberos, and I have a test client app that can successfully make calls to the standard PSI Services on the classic and claims web apps (both Windows or Forms auth), so it seems like the client config is correct. I believe that the problem is with the server bindings/behaviors/services configuration for my service, but I have not been able to find anything that show how to do this correctly to support both classic and claims/muti-auth. Right now, everything is configured as defined in Writing a PSI Extension for Project Server 2010, except I am using Windows clientCredentialType instead of NTLM. Does anyone know where I can find this configuration info?

    Thanks,

    Erik


    Erik RHS
    Friday, January 28, 2011 3:06 AM

All replies

  • I think I solved this problem, thanks to Custom WCF Services in SharePoint 2010. Here's what I did:

    1. Change the service application to add a reference to Microsoft.SharePoint.Client.ServerRuntime and add the BasicHttpBindingServiceMetadataExchangeEndpointAttribute to the implementation class.
    2. Change the .svc file to add Factory="Microsoft.SharePoint.Client.Services.MultipleBaseAddressBasicHttpBindingServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" to the activation instruction.
    3. Delete everything I had previously added to <Common Files>\Microsoft Shared\Web Server Extensions\14\ISAPI\PSI\web.config except the following:
    ...
    <system.serviceModel>
    ...
     <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
    
     <behaviors>
      <serviceBehaviors>
       <behavior name="PSIExtensionServiceBehavior">
        <serviceDebug includeExceptionDetailInFaults="true" />
       </behavior>
      </serviceBehaviors>
     </behaviors>
    
     <services>
      <service name="MyServiceNamespace.MyServiceClass"
        behaviorConfiguration="PSIExtensionServiceBehavior">
      </service>
     </services>
    ...
    </system.serviceModel>
    

    Hopefully, I am on the right path. If anyone with more experience has any comments, I would welcome them.

    Cheers,

    Erik


    Erik RHS
    Friday, January 28, 2011 9:27 PM