problem with saving global login information

L

linda.chen

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top