Problem with session....
-
Hello all, I have developed a web application in ASP.Net using C# with login credentials. I am getting following problem with it..... I am logging in as user "abc" from one computer in network, its working fine. At the same time, i m logging in as different user say "xyz" on other computer. After this, when i refreshes my "abc" user's page it shows all contents of "xyz" user and hence automatically expires session of "abc". I am not getting where the actual problem is, please anyone of u can help me with this?
Pravin
-
Hello all, I have developed a web application in ASP.Net using C# with login credentials. I am getting following problem with it..... I am logging in as user "abc" from one computer in network, its working fine. At the same time, i m logging in as different user say "xyz" on other computer. After this, when i refreshes my "abc" user's page it shows all contents of "xyz" user and hence automatically expires session of "abc". I am not getting where the actual problem is, please anyone of u can help me with this?
Pravin
pavya_Cool wrote:
when i refreshes my "abc" user's page it shows all contents of "xyz" user and hence automatically expires session of "abc".
Are you using Application variable to store the user details? And what is the authentication mode here?
- Regards -
JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
-
Hello all, I have developed a web application in ASP.Net using C# with login credentials. I am getting following problem with it..... I am logging in as user "abc" from one computer in network, its working fine. At the same time, i m logging in as different user say "xyz" on other computer. After this, when i refreshes my "abc" user's page it shows all contents of "xyz" user and hence automatically expires session of "abc". I am not getting where the actual problem is, please anyone of u can help me with this?
Pravin
-
pavya_Cool wrote:
when i refreshes my "abc" user's page it shows all contents of "xyz" user and hence automatically expires session of "abc".
Are you using Application variable to store the user details? And what is the authentication mode here?
- Regards -
JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
Hi I am using session variable here...and authentication mode is forms.
Pravin
-
Can you post an example of the code you are using to store the details of the current user?
private void BtnGo_Click(object sender, System.EventArgs e) { Label1.Visible=false; bool persistcookie=true; if(ValidateUser(TextBox1.Text,TextBox2.Text)) { //string globalstrConn="Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=iMedia;Integrated Security=SSPI;"; Session["UserName"]=TextBox1.Text; //This will store the username of the user in this session variable // We can retrieve this username on different pages by using following code. // string str=Convert.ToString(Session["UserName"]); FormsAuthenticationTicket tkt; string cookiestr; HttpCookie ck; tkt=new FormsAuthenticationTicket(1,TextBox1.Text,System.DateTime.Now,System.DateTime.Now.AddMinutes(Convert.ToInt32(ConfigurationSettings.AppSettings["timeout"])),persistcookie,"Your Custom Date"); cookiestr=FormsAuthentication.Encrypt(tkt); ck=new HttpCookie(FormsAuthentication.FormsCookieName,cookiestr); if(persistcookie) ck.Expires =tkt.Expiration; ck.Path =FormsAuthentication.FormsCookiePath; Response.Cookies.Add(ck); string strredirect; strredirect=Request["ReturnUrl"]; if(strredirect==null) strredirect="login.aspx"; Response.Redirect(ConfigurationSettings.AppSettings["defaultpage"],true); } else { Label1.Text="Invalid Credentials!"; Label1.Visible=true; // Response.Redirect("login.aspx",true); } } Please someone help me.
Pravin
-
Hello all, I have developed a web application in ASP.Net using C# with login credentials. I am getting following problem with it..... I am logging in as user "abc" from one computer in network, its working fine. At the same time, i m logging in as different user say "xyz" on other computer. After this, when i refreshes my "abc" user's page it shows all contents of "xyz" user and hence automatically expires session of "abc". I am not getting where the actual problem is, please anyone of u can help me with this?
Pravin
I'm very suspicious of your post because it's identical to the following posts. http://www.codeproject.com/script/comments/forums.asp?msg=2340463&forumid=12076#xx2340463xx[^] http://www.codeproject.com/script/comments/forums.asp?forumid=12076&select=2340694#xx2340694xx[^] What's going on here?:suss:
Deja View - the feeling that you've seen this post before.
-
I'm very suspicious of your post because it's identical to the following posts. http://www.codeproject.com/script/comments/forums.asp?msg=2340463&forumid=12076#xx2340463xx[^] http://www.codeproject.com/script/comments/forums.asp?forumid=12076&select=2340694#xx2340694xx[^] What's going on here?:suss:
Deja View - the feeling that you've seen this post before.
i am not getting responce there.... thats why i posted here ... do u have any problem????
Pravin
-
i am not getting responce there.... thats why i posted here ... do u have any problem????
Pravin
pavya_Cool wrote:
am not getting responce there.... thats why i posted here ... do u have any problem????
Yes. These posts aren't under your name. Have you created multiple identities? More importantly, if these are all you, you shouldn't repost in an attempt to get the post to the top. This is a volunteer only forum, and people will get around to your post when they can.
Deja View - the feeling that you've seen this post before.
-
pavya_Cool wrote:
am not getting responce there.... thats why i posted here ... do u have any problem????
Yes. These posts aren't under your name. Have you created multiple identities? More importantly, if these are all you, you shouldn't repost in an attempt to get the post to the top. This is a volunteer only forum, and people will get around to your post when they can.
Deja View - the feeling that you've seen this post before.
Pete O`Hanlon wrote:
Have you created multiple identities?
In the study of Psychology, there is a concept called 'Multiple Identity Disorder'. A quick Google search shows this: http://skepdic.com/mpd.html[^] Perhaps, is he suffering from that?
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson