开发者

Using a console application to host WCF endpoints that expose asp.net ProfileService, ProfileService and RoleService

I've got an MVC web application that is used as an interface to a Console based app that exposes a bunch of ServiceHost/s using the net.pipe protocol.

I would like to use the asp.net membership/role/profile provider to manage my users and their roles and profile information (Inside the Console Application). I've done this in quite a few apps, but normally I reference these providers directly from the web application itself.

This is a good walk-through on doing pretty much what I would like, except I don't want to host the WCF service endpoints in IIS, but inside my console 开发者_高级运维app - which will eventually become a windows service. When I try and host the ServiceHost through my console application I get the following error:

This service requires ASP.NET compatibility and must be hosted in IIS.  
Either host the service in IIS with ASP.NET compatibility turned on in 
web.config or set the
AspNetCompatibilityRequirementsAttribute.AspNetCompatibilityRequirementsMode 
property to a value other than Required.

Now it seems that I won't be able to set that property to anything other than Required.

I've tried another route which is using the wrapper class/interface defined here for my authentication service, which I managed to get wired into in my MVC app without too much trouble, but this doesn't cover my Authorisation (using roles) or profile needs.

Has anyone got a solution to this, I can't be the only one trying to do this? I'm not

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜