I'm currently looking to create a new JSON enabled WCF project. After authenticating I will create a temporary session key for subsequent requests. This key will be stored in a database table and used to validate specific requests to process data. This should reduce database impact as the table will be mem-cached for speed and will avoid sending full credentials on every request. I should explain that all requests must have the contect of the user account, a generci API-key scenario is not enough.
To make the magic happen I want to share the same user database as the website and would like to use the SqlMembershipProvider class(es).开发者_开发问答 I can't pass credentials from the website to the WebService as the service will be accessed from devices and the certification system requirement is not feasible anyway.
Is it possible to import the System.Web.Security namespace into my WCF project or will I need to write a new membership management system and use that, allowing me to share code between my two projects?
Thanks for the help,
Dre
When I try to import the namespace it's not there for that project, even though Iv'e checked that it's targeting the .NET 4 framework. It's almost as though it's not seeing, or filtering out, the namespace.
I'm going to try creating a new project this evening from scratch and see if it's do the trick. Worst case, I may even try rolling back from VS2010 to VS2008 as my development environment.
精彩评论