Wrap a .net project with MVC authenitification from another project?
I have a MVC site which I have built a custom authentication for. I now have a legacy site written in plain old c# .net but I would like to wrap my security from my MVC site around. Essential I would like the .net site to check if a session exists on the MVC and proceed if it does and redirect to the MVC site login if it doesn't. Simple?
I was thinking of possibly开发者_如何学编程 creating a web server or something of that effect. But to be honest I'm just finishing for idea of how I could achieve this.
Take a look at how to share session between two apps for some pointers: Sharing sessions across applications using the ASP.NET Session State Service
When you say you want to Wrap Security Around, You can use WCF Service Provider for Membership and authentication in both the apps so that you don't have to worry about the session at one vs other.. Here is another thread on this:
WCF, ASP.NET Membership Provider and Authentication Service
精彩评论