473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

HOWTO: Add User To Membership System After Being Windows Authentic

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
2 1404
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Peter Tragardh | last post by:
I'm searching for info on how to authenticate a user in the same way that for example Source Safe does. I would like my system to use Windows as the authenticator, so that the user doesn't have to...
0
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another...
0
by: clintonG | last post by:
I applied aspnet_regsql to SQL2K which was working fine throughout Beta 2 development. After installing Visual Studio and SQL Express RTM my application has blown up. Logging in to the application...
8
by: Mark White | last post by:
Hey everyone I'm having a great deal of problems finding this information through google and yahoo, so I turn to you on this. I have a Windows app running on XP. I am able to caputre the...
5
by: Vishal Gupta | last post by:
Hi This is Vishal this side.I have been trying to create a new sample website using the new Membership Provider Class. Now when I try to a create a new website and then hit on the Website...
3
by: Dan Sikorsky | last post by:
How do you get a reference to the LoginStatus control contained in the LoginView control that resides on web.master? I need to determine if the LoginStatus will show a LogOut link(for a logged...
3
by: Electrified Research | last post by:
So I've been playing with WebParts. Very cool stuff. The personalization scope has "Shared" and "User". "Shared" allows for an admin to customize a page and how other users see that page. ...
2
by: =?Utf-8?B?Z292ZXI=?= | last post by:
Hello, I want to provide the ability to log on to a web application on our intranet using different credentials like they do in Sharepoint 2007. When a user hits the site, i want him...
4
by: Brett | last post by:
I have an ASP.NET 2.0 application that uses Forms Authentication. The startup page contains just a login control, and the site works well on an IIS 6 web server. I am now setting the site up on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.