J Lundberg
J Lundberg

Reputation: 2363

Custom Authroization w/MVC

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

Upvotes: 1

Views: 135

Answers (2)

Mathias F
Mathias F

Reputation: 15901

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.

Upvotes: 0

Keith Adler
Keith Adler

Reputation: 21178

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.

Upvotes: 4

Related Questions