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:
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?