ASP.NET Mixed Mode Authentication

Published Monday, November 01, 2004 8:56 AM

Ever wanted to have an ASP.NET application that utilises the seamless login process of windows integrated authentication (for intranet users for example), but also be able to easily handle anonynous/forms based authentication, and all using the one standard principal object behind the scenes for full role based authorisation support?

I have just written an article that describes one way of doing this.

Would love to hear any feedback.

 

by Glav

Comments

# Paul Wilson said on Monday, November 01, 2004 7:50 AM

Here's an article (of mine) that provides another option to integrate both forms and windows auth:
http://msdn.microsoft.com/library/en-us/dnaspp/html/mixedsecurity.asp

You'll still to query Windows roles, but that's very doable with code on the net. I personally think having two entry points, as you've done, is smoother but I was forced to create my single entry point solution for one gig. :)

# Paul Glavich said on Tuesday, November 02, 2004 7:23 AM

Thanks for the comments Paul. Its interesting to see the many different ways of accomplishing the same goal.

# Monir said on Tuesday, August 28, 2007 1:47 AM

Hi,I am having Problem in the web site for FormAuthentication.When I entered into the Windows Authentication Site it redirects to the Form Authentication Site with cookie 'CMUCookie'.

FormsAuthentication.FormsCookieName equals to also 'CMUCookie'.But the problem is that the codes below  in the global.asax in the Form Authentication Site does not execute. That is cookieFound =false. why this is happening?

I have made the virtual directory as u directed.

if (cookie.Name == FormsAuthentication.FormsCookieName)

           {                                              

               cookieFound = true;

               authCookie = cookie;                

               break;

           }

# ralph said on Tuesday, December 09, 2008 4:25 PM

I'm trying toimplement something similar to this under asp.net 3.5. I want to have users inside outr domain login using their windows ID/Password byt internet users login using a uid password stored in our database. I'm thinking I can use forms authentication with two  membership providers (activedirectorymembershipProvide and SqlMembershipprovider). Have you any thoughts on how I might accomplish this?

# Glav said on Thursday, January 08, 2009 10:40 PM

Ralph, you wont do it seamlessly just using membership providers as you will still need to ask for a password, even though they have already logged into the domain. If thats ok, then you probably dont need 2 membership providers, just one that knows which store to check (db or Active Dir).

Leave a Comment

(required) 
(required) 
(optional)
(required) 

This Blog

Syndication