473,385 Members | 1,707 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,385 software developers and data experts.

problem with saving global login information

I am not an experienced asp.net developer.

A while ago I created a website related to my other project, which
requires login before start.

I created a global.asax file, set the user name and a couple other
information as properties of global class. I get and display the user
name in each web page by calling Global.UserName.

I am assuming that the Global.UserName is remembered by session based.

When I log onto one machine as user1, it displays user1 in page 1
(good), then go to another machine to login as user2, come back to
machine1 and move the webpage to page 2, page2 displays user2 as the
user name (bad).

How do I remember the user name in session based? I also need to save
a global data structure (in a class) in session based, so I don't
think I can user Session["parameter name"] to do that.

Any good idea?

Thanks.

Linda Chen

May 4 '07 #1
1 1129
Linda,
No, global.UserName is *NOT* "remembered as Session-based" - its' static and
is the same to ALL users that use your application.

I think you should read up on Membership, Roles and Profiles in the
quickstarts before you get further off on the wrong foot. At least, you
aren't in the control tower..l
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"li********@faa.gov" wrote:
I am not an experienced asp.net developer.

A while ago I created a website related to my other project, which
requires login before start.

I created a global.asax file, set the user name and a couple other
information as properties of global class. I get and display the user
name in each web page by calling Global.UserName.

I am assuming that the Global.UserName is remembered by session based.

When I log onto one machine as user1, it displays user1 in page 1
(good), then go to another machine to login as user2, come back to
machine1 and move the webpage to page 2, page2 displays user2 as the
user name (bad).

How do I remember the user name in session based? I also need to save
a global data structure (in a class) in session based, so I don't
think I can user Session["parameter name"] to do that.

Any good idea?

Thanks.

Linda Chen

May 4 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Bartosz Wegrzyn | last post by:
I need help with sessions. I createt set of web site for nav with authorization. first I go into main.php which looks like this: <?php //common functions include_once '../login/common.php';...
2
by: bagsmode | last post by:
Hi, I'm trying to set a session cookie and then redirect, however I get the error: Status: 302 Moved Location: /index.cgi I thought I recall getting an error like this when I first tried...
11
by: ElmoWatson | last post by:
I tried on the Security newgroup, as well as other places, and haven't gotten an answer yet - - I'm pulling my hair out over this one. I'm trying to get Forms Authentication working.....I can get...
5
by: Mikko Penkkimäki | last post by:
Hi Looks like I can not change Web page's timeout setting. In practise it's all the time 20 minutes - no matter what I do. I have this kind of setting in web.config: <sessionState...
2
by: Bryan | last post by:
Hello, I'm just starting to develop in asp.net and i have a question about using a database connection globally in my app. I have set up the procedures for getting all my connection string info...
12
by: Anon | last post by:
Hello All! I was wondering how I can go about saving the last string entered into a textbox. I would like to save username or pwd info in textboxes in my forms so that users don't have to...
11
by: Sylvia A. | last post by:
How can I define global classes in web application ? Classes can be set to session variables ? Thanks
1
by: eblackmo | last post by:
I have a test network consisting of four servers running windows 2003 server R2 SP2. I have set up a domain which functioned correctly for about a day and a half until the other servers decided they...
1
by: Brock | last post by:
Thanks in advance... (you can see a screenshot of what my form looks like currently at http://www.juggernautical.com/DataGrid.jpg - the Datalist is super-imposed in 'design view' but the DataGrid...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.