0

I have built a simple wcf web service and hosted it on a SharePoint server. Standard settings - wcf scv file deployed to the ISAPI folder and MultipleBaseAddressBasicHttpBindingServiceHostFactory used as factory.

The web service is accessible with an url in the format:

"_http://sharepointServer/sites/siteColl/vti_bin/SomeFolder/SomeService.svc/mex"

the outputted wsdl shows that the service use basichttpbinding and ntlm auth (as expected).

If I try to reference the web service from a Silverlight project, I receive an error

Custom tool error: no endpoint compatible with Silverlight 5 was found

What dazzles me is that if I host the same service somewhere outside SharePoint (without using ntlm security, only a standard basicHttpBinding) I am able to reference it with no problem at all. After that, using the generated service reference against the original SharePoint hosted service works with no problem. That was caused by a different configuration in the add service reference dialog, the behavior was actually the same

I have checked the endpoint configuration for the SharePoint and the self hosted instances of the service - the self hosted instance is missing the ntlm transport security behavior config. So WHY the reference generated for the service outside SharePoint is able to work with the SharePoint hosted service by just changing the endpoint address url?

1 Answer 1

0

There was an error in the add service reference procedure, so one of my assumption -service reference working from outside SharePoint and not working for SharePoint hosted service- was wrong. While adding the service reference to the SharePoint hosted service, I had forgot to deselect the checkbox "reuse referenced assembly" in the advanced settings of the add service reference dialog. This was the real cause of the error - ie visual studio trying to reuse some referenced assembly not compatible with the Silverlight runtime. Since I had no need for that assemblies on the client service reference, in the end I just deselected them.

About the NTLM transport security configuration missing on the non-SharePoint hosted service... I am still trying to understand why the service reference was working even against the SharePoint hosted service instance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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