By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,152 Members | 2,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,152 IT Pros & Developers. It's quick & easy.

Windows Authentication

P: n/a
Is there a way to use a web form as a means to authorize a user through
windows authentication?

For Example:

http://www.mysite.com/login.aspx. (anonymous access)

http://www.mysite.com/secure (secured by basic authentication)

Login.aspx would handle the authentication and redirect to
http://www.mysite.com/secure (and the user would not be asked for
credentials).

May 30 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Windows Authentication expects the user to have a valid domain / Active
Directory account. The user's browser automatically transmits the credentials
in response to the Windows Auth challenge, so there should not be any login
dialog if the app is set up correctly.

However, you can write an HTTPBasic or HTTPDigest Authentication module that
will work in a similar manner, and do your authentication against a database.

Here is one with VB.NET that I did:

http://www.eggheadcafe.com/articles/20040317.asp

and here is one in C#:

http://www.eggheadcafe.com/articles/20030701.asp

Both of these were based on excellent sample code by Greg Reinacker.

Hope that helps,
Peter

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Ian Jenkins, MCSD" wrote:
Is there a way to use a web form as a means to authorize a user through
windows authentication?

For Example:

http://www.mysite.com/login.aspx. (anonymous access)

http://www.mysite.com/secure (secured by basic authentication)

Login.aspx would handle the authentication and redirect to
http://www.mysite.com/secure (and the user would not be asked for
credentials).

May 30 '06 #2

P: n/a

"Ian Jenkins, MCSD" <jw*******@gmail.com> wrote in message
news:11********************@r44g2000cwb.googlegrou ps.com...
| Is there a way to use a web form as a means to authorize a user through
| windows authentication?
|
| For Example:
|
| http://www.mysite.com/login.aspx. (anonymous access)
|
| http://www.mysite.com/secure (secured by basic authentication)
|
| Login.aspx would handle the authentication and redirect to
| http://www.mysite.com/secure (and the user would not be asked for
| credentials).
|

A number of patterns & practices modules do cover this, start with:
http://msdn.microsoft.com/library/de...lained0001.asp
and read the docs refered to in "Additional Resources".

Willy.
May 31 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.