User Accounts
-
Hi, I'm making a website in ASP.NET (C#) that handles users. How do I store data specific to the user's connection. I got it working using static variables, but it turns out that all users have the same values for static variables (which makes sense now that I think about it). How can I "remember" the user id of someone who logged in and not have it mix up other users? I know I could do it by using a static hashtable of userids and ipaddresses but I feel like this is probably a more complicated solution than it needs to be. I know this is probably a pretty common question, and I'm sorry if its been asked before. Any response would be helpful though. Thanks,
-
Hi, I'm making a website in ASP.NET (C#) that handles users. How do I store data specific to the user's connection. I got it working using static variables, but it turns out that all users have the same values for static variables (which makes sense now that I think about it). How can I "remember" the user id of someone who logged in and not have it mix up other users? I know I could do it by using a static hashtable of userids and ipaddresses but I feel like this is probably a more complicated solution than it needs to be. I know this is probably a pretty common question, and I'm sorry if its been asked before. Any response would be helpful though. Thanks,
Most people do not have static IP addresses. You would expect to have a database of usernames and passwords and then store who is logged in, in the session.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Most people do not have static IP addresses. You would expect to have a database of usernames and passwords and then store who is logged in, in the session.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
thanks christian. the word 'session' was what i was looking for. I appreciate it...thanks a lot man, -ken