Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Custom service application - error when trying to use claims authentication

$
0
0

I have been working on creating a custom service application (in SharePoint 2010) based on the walkthrough provided here. I'm completely new to service applications, using claims authentication, and have limited experience with WCF services, so please forgive me if I get some of the terminology wrong.

I can get my service application working if I set up the endpoints (in client.config and web.config) to use a basicHttpBinding with zero security. (I.e. security mode="None") However, I don't want to leave my service completely open like that, so I am trying to switch over to using claims authentication, as described in this blog post.

However, if I do that, I end up getting an error:

System.ServiceModel.ServiceActivationException: The service '/bed917ffa08d4f1e98b65aae219903af/MyCustomService.svc' cannot be activated due to an exception during compilation. The exception message is: Service 'My.NameSpace.ServiceApplications.MyCustomService' has zero application (non-infrastructure) endpoints.

I did some research into the "zero application endpoints" error, and most of the time the problem was that in the web.config for the service, the service name did not include the full namespace. Mine does include the full namespace.

Anyone have any pointers on this? My web.config and client.config are set up identically to the ones in the examples, except obviously I have changed the contract and service names to reflect my own namespace / class / contract names. The service host factory seems to be working, because if I set a breakpoint in the host factory CreateServiceHost() method, I can see that it's getting hit, and supposedly configuring the service host that's being created to use claims.

I have confirmed that the Security Token Service is running correctly.  But do I need to "enable" claims somewhere else in SharePoint? Because the implication in the blog that I linked to above is that the service application framework is already set up to use claims by default.


Dylan Cristy | MCTS SharePoint 2010 Application Development
Blog: morefunthanapokeintheeye.blogspot.com


Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>