Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 24th, 2010, 06:04 PM
Authorized User
Points: 154, Level: 3
Points: 154, Level: 3 Points: 154, Level: 3 Points: 154, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #2 (permalink)  
Old February 2nd, 2010, 07:54 AM
Authorized User
Points: 154, Level: 3
Points: 154, Level: 3 Points: 154, Level: 3 Points: 154, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:41 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.