Groups | Blog | Home
all groups > asp.net webcontrols > october 2006 >

asp.net webcontrols : Enabling Windows Authentication from inside Forms Authentication (ASP.NET 2.0)


Michael D. Ober
10/25/2006 2:52:40 PM
I need the ability to bypass the forms authentication login page when the
user requesting the protected page is running on our corporate network and
is also logged into the corporate domain. How do I do this?

Thanks,
Mike Ober.

Jeff Dillon
10/25/2006 3:33:56 PM

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/mixedsecurity.asp

[quoted text, click to view]

Dominick Baier
10/25/2006 10:03:22 PM
Thats not easily doable.

the easiest way is to provider two application entry points - one for non-domain
users, and a separate app for domain users that converts the windows account
details to a forms auth cookie.

another option is to modify the pipeline and inject some modules that "bypass"
forms auth - this needs some kind of indicator if windows auth should be
used or not - like an IP address range for domain users.

i described both approaches and trade offs in detail here - but feel free
to ask more questions:

http://www.microsoft.com/mspress/books/9989.asp

---
Dominick Baier, DevelopMentor
http://www.leastprivilege.com

[quoted text, click to view]

Michael D. Ober
10/26/2006 6:53:25 AM
Jeff,

Thanks for the link.

Mike Ober.

[quoted text, click to view]

Phil H
10/29/2006 1:43:31 PM
Dear Mike

You don't say whether external users have an internal network account
but if you opt for Windows authentication in web.config and set
Directory Security in IIS to "Integrated Windows" and disable
"Anonymous access" then external visitors will be prompted for a
username and password. The credentials they supply will be verified by
a domain controller in the same manner as in internal corporate network
login.

Hope that's helpful

Phil Hall
Michael D. Ober
10/30/2006 7:14:00 AM
That won't work. My external users must use Forms Authentication because
they don't have domain accounts (nor am I going to shell out $$$ to M$ for
web-enabled CALs for them.) I did solve the problem by mimicking the login
control, however.

Mike.

[quoted text, click to view]

Michael D. Ober
10/30/2006 8:17:50 AM
Phil,

Sorry about being curt - it's Monday from Hell here.

Mike.

[quoted text, click to view]

AddThis Social Bookmark Button