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

HOWTO: Add User To Membership System After Being Windows Authentic

P: n/a
My website users will all come from the same domain after they first login to
the network in the morning; therefore I would like to use the benefits of
Windows Authentication. But I would like to use the benefits of the
Membership system for things like controlling access to certain web pages
using Roles, password retrieval, etc.

I think the best way to use both authentication systems is to declare Forms
authentication in the web.config file, but to get the username from
Request.Servervariables("LOGON_USER"), contrive a password and email address,
and do a Membership.CreateUser.

How do I programmatically login a user?

--
Thank you kindly,

Dan Sikorsky BA, BSCE, MCS
Jul 24 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Dan,

If you've got the user's name you can log the user in like this:

FormsAuthentication.SetAuthCookie _
("JackieReeve", True)

Is that what you meant?

Ken
Microsoft MVP [ASP.NET]
"Dan Sikorsky" <Da*********@discussions.microsoft.comwrote in message
news:80**********************************@microsof t.com...
My website users will all come from the same domain after they first login
to
the network in the morning; therefore I would like to use the benefits of
Windows Authentication. But I would like to use the benefits of the
Membership system for things like controlling access to certain web pages
using Roles, password retrieval, etc.

I think the best way to use both authentication systems is to declare
Forms
authentication in the web.config file, but to get the username from
Request.Servervariables("LOGON_USER"), contrive a password and email
address,
and do a Membership.CreateUser.

How do I programmatically login a user?

--
Thank you kindly,

Dan Sikorsky BA, BSCE, MCS

Jul 24 '06 #2

P: n/a
Yes, it is ... thanks.
--
Thank you kindly,

Dan Sikorsky BA, BSCE, MCS
"Ken Cox [Microsoft MVP]" wrote:
Hi Dan,

If you've got the user's name you can log the user in like this:

FormsAuthentication.SetAuthCookie _
("JackieReeve", True)

Is that what you meant?

Ken
Microsoft MVP [ASP.NET]
"Dan Sikorsky" <Da*********@discussions.microsoft.comwrote in message
news:80**********************************@microsof t.com...
My website users will all come from the same domain after they first login
to
the network in the morning; therefore I would like to use the benefits of
Windows Authentication. But I would like to use the benefits of the
Membership system for things like controlling access to certain web pages
using Roles, password retrieval, etc.

I think the best way to use both authentication systems is to declare
Forms
authentication in the web.config file, but to get the username from
Request.Servervariables("LOGON_USER"), contrive a password and email
address,
and do a Membership.CreateUser.

How do I programmatically login a user?

--
Thank you kindly,

Dan Sikorsky BA, BSCE, MCS


Jul 31 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.