Security issue when calling a WCF service from SharePoint
I've recently been charged with integrating several WCF services into SharePoint and it's been relatively smooth sailing up until I began to receive the following exception:
"The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate......."
My endpoint configuration originally looked like so:
<endpoint address="http://myserver/Services/BackOfficeService/basic"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IBackOfficeService"
contract="BackOfficeService.IBackOfficeService" name="BasicHttpBinding_IBackOfficeService" />
Looks ok, right?
Wrong! We are missing the 'identity' child of the endpoint element. So, to correct this issue, the final product should look like this:
<endpoint address="http://myserver/Services/BackOfficeService/basic"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IBackOfficeService"
contract="BackOfficeService.IBackOfficeService" name="BasicHttpBinding_IBackOfficeService">
<identity>
<userPrincipalName value="service@company.com" />
</identity>
</endpoint>
HTH,
Grant
"The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate......."
My endpoint configuration originally looked like so:
<endpoint address="http://myserver/Services/BackOfficeService/basic"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IBackOfficeService"
contract="BackOfficeService.IBackOfficeService" name="BasicHttpBinding_IBackOfficeService" />
Looks ok, right?
Wrong! We are missing the 'identity' child of the endpoint element. So, to correct this issue, the final product should look like this:
<endpoint address="http://myserver/Services/BackOfficeService/basic"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IBackOfficeService"
contract="BackOfficeService.IBackOfficeService" name="BasicHttpBinding_IBackOfficeService">
<identity>
<userPrincipalName value="service@company.com" />
</identity>
</endpoint>
HTH,
Grant
Comments
I am being charged with the same task and was hoping maybe you could provide me with some steps or an example project? Anything would be greatly appreciated.