Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 08, 2012 10:29 AM by msteel9999
Member
2 Points
3 Posts
Sep 28, 2011 02:35 PM|LINK
I'm converting an ASP project into MVC. I want to keep the existing authentication mechanism in the ASP part of the project but
automatically log the user in when they try to access one of the MVC pages.
Any thoughts on a strategy to implement this. For example I could use cookies and the database.
With the two projects running side by side in different app pools I won't be able to pass session variables between the two.
Any help appreciated.
Contributor
2693 Points
542 Posts
Feb 04, 2012 01:34 PM|LINK
Well, you could create a md5 hash based on the username and time for example and send those thru via the url, if on the other end the expected variables pass, the user can be authenticated...
7 Points
8 Posts
Feb 04, 2012 01:55 PM|LINK
I hope this help you to implement authentication system in your application.
Feb 08, 2012 10:29 AM|LINK
Pretty much did it this way.
I encrypted the userid as stored in the database and passed this in the url to the MVC part of the project.
Then I authenticated when accessing the first page in the mvc part of the project storing it in the session
to avoid logging in on every page accessed.
Only tricky bit is calling my encryption class from ASP which requires some regasm fun and is tricky on 64 bit servers.
msteel9999
Member
2 Points
3 Posts
Authentication in Classic ASP/MVC 3
Sep 28, 2011 02:35 PM|LINK
I'm converting an ASP project into MVC. I want to keep the existing authentication mechanism in the ASP part of the project but
automatically log the user in when they try to access one of the MVC pages.
Any thoughts on a strategy to implement this. For example I could use cookies and the database.
With the two projects running side by side in different app pools I won't be able to pass session variables between the two.
Any help appreciated.
interwandere...
Contributor
2693 Points
542 Posts
Re: Authentication in Classic ASP/MVC 3
Feb 04, 2012 01:34 PM|LINK
Well, you could create a md5 hash based on the username and time for example and send those thru via the url, if on the other end the expected variables pass, the user can be authenticated...
.one of my (older) projects social tomorrow and
silver cooki...
Member
7 Points
8 Posts
Re: Authentication in Classic ASP/MVC 3
Feb 04, 2012 01:55 PM|LINK
I hope this help you to implement authentication system in your application.
msteel9999
Member
2 Points
3 Posts
Re: Authentication in Classic ASP/MVC 3
Feb 08, 2012 10:29 AM|LINK
Pretty much did it this way.
I encrypted the userid as stored in the database and passed this in the url to the MVC part of the project.
Then I authenticated when accessing the first page in the mvc part of the project storing it in the session
to avoid logging in on every page accessed.
Only tricky bit is calling my encryption class from ASP which requires some regasm fun and is tricky on 64 bit servers.