Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 December 14th, 2006, 10:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

you are confusing me.. :)

let's try again..

original problem: user not get logged in all the time...

according to your logic, you are verifying every time that the user is logged. Since you are not using passport authentication's, and you are using your own, this is simple as get and if with session("userid") <> 0 every time you need to know if the user is authenticated. That way the only way to get logged off is to finish the session.

are we getting better?

HTH

Gonzalo
 
Old December 14th, 2006, 10:44 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks to all, i got i cleared.
and i am really really very sorry for confusing you all.

i will try to improve my logic, so that, if i need your help and advises, i should not waste yours time.

Mr. Parson, i am once again sorry to know that, its harder for you to get into my questions.

Can you suggest some ways, how can i improve the logic?

thanks

 
Old December 14th, 2006, 11:09 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Well

Improvement comes with experience, try to work in a good team, share your thoughts with them, listen to their views, moreover, discuss your issues with your peers to get some useful advice.

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.
 
Old December 14th, 2006, 11:39 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I agree with Mike and I am sorry, I don't mean to come off sounding rude or demeaning to you when I say something is poorly written; I understand that programming is a learning experience and I try to help as many people on here as I can so take my comments with a grain of salt and just realise that I am trying to help you and show you a better way to do things. =]

In so far as improving the logic, personally, I would use the FormsAuthentication class throughout your application as opposed to using your own session values (e.g. Session("userid")) and the reason for this is that the framework handles all of the dirty work, it creates the login cookie, assigns the necessary values, then all you have to do is call User.Identitiy.IsAuthenticated on any page that you want to test for a user being logged into your system.

Session's timeout; cookies can last forever or until the browser is closed. In your application, I think your users would benifit more from the cookie approach and, proof of concept, look at Amazon or Ebay or any other online retailer they determine who you are by the cookie that is on your machine.

Lastly, by using cookies you relieve some strain on your server; remember: anything you add to the SessionState Bag is stored in server memory and you can potentially run into a preformance issue if you have a multitude of people hitting your website.

Again these are my opinion and what I would do, not necessarily what everyone else would do. =]

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
 
Old December 14th, 2006, 11:55 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks to all for your advises
i will definitely follow your suggestions, as i am a beginner, and i want to improve.

thanks once again for all the help and support






Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I check whether a user is logged in or out rittwick PHP Databases 1 August 19th, 2007 04:47 PM
user logged jonyBravo Access 6 November 27th, 2006 09:14 AM
Username of logged in user spardoe BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 August 18th, 2006 01:13 AM
Getting the name of the logged on user Grahame2003 C# 2 March 4th, 2004 04:48 AM





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