views:

90

answers:

2

I am writing a web app using MVC and the first page will be a login screen. What is the best way to setup an authorization off of this first page to provide authorization for the entire session. The login information will be held in a database which will be half pulled from an HR db and an AD db.

Thanks

+4  A: 

You should simply implement your own version of Forms Authentication in the very same fashion that you would implement a custom provider for non MVC applications.

http://support.microsoft.com/kb/301240

This should be helpful.

Nissan Fan
A: 

I am not shure if I fully understood the question. Is it right that you go with Forms Authentication and you need to change where the login information comes from? Then you should retag the question as Membership.

I assume you want to implement a custom membership provider.

A good starting point is to have a look at the source of the SqlMembershipProvider and debug into it.

Provider Toolkit

Download Sample Access Providers

Even if I use the default implementation I prefer to be able to debug into the source of the SqlMembershipProvider.

Malcolm Frexner