Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 24th, 2010, 06:04 PM
Authorized User
 
Join Date: Jan 2010
Posts: 34
Thanks: 5
Thanked 0 Times in 0 Posts
Default MemberShip and Roles

I asked Imar a question . here it is and here is his answers:
Q:
In the web site I building I have a customers tables where I have login and password
The web is designed to not let new user create account and login
People who need to login get the user and password from our customers service.
So I wanted to know what is the best way to handle this, because I don’t think I need to use the Role and Membership objects and also the aspnetdb to control the users.
I just want to check against my table and keep a session variables (or profile) for the user
(Customer id and name).
Is there a way to do that nice and easy?
Do I need to set form authentication mode? Set the session timeout? Where to check the user and password against my DB (customer table) – in the Login1_Authenticate event?
Or am I completely wrong here?

Imar answer:
1. Why wouldn’t you use MemberShip and Roles? Your admins can use the same controls to create accounts for others. Why complicate matters and roll your own solution?

2. In that case, you could try building your own provider: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=404 The article explains how to use Microsoft Access, but it contains a link to the SQL Server version of the full source code. Not an easy thing to do, though.

If all you need to do is authenticate, you can use FormsAuthentication (http://www.google.com/search?hl=en&q...&aqi=g-sx1&oq=) and target your own database.

many thanks to Imar
Barak
 
Old February 2nd, 2010, 07:54 AM
Authorized User
 
Join Date: Jan 2010
Posts: 34
Thanks: 5
Thanked 0 Times in 0 Posts
Default what about session?

can I use session object to hold the logged user name (which is all I need after verify that this is the user by login+pass from the DB)?

can I set the sessionstate timeout to say 6 hours and the seesion will remain or this is risky?

does session is trustable for this matter?

thanks for your time

barak





Similar Threads
Thread Thread Starter Forum Replies Last Post
Membership and Roles doesnt work Baby_programmer ASP.NET 2.0 Professional 2 July 29th, 2008 09:41 AM
Roles bhasker_braj121 SQL Server 2005 1 January 19th, 2008 12:10 PM
Roles jackandjo BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 October 17th, 2006 03:12 AM
Roles and membership asp.net 2 zeeshannasir ASP.NET 1.x and 2.0 Application Design 1 September 22nd, 2006 03:34 AM
Roles and membership asp.net 2 zeeshannasir ASP.NET 2.0 Basics 2 September 15th, 2006 07:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.