Click here to Skip to main content
15,917,328 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Framework 3.0 with IIS Pin
eyeseetee12-Mar-08 0:36
eyeseetee12-Mar-08 0:36 
QuestionAdRotator [modified] Pin
Assaf8211-Mar-08 23:57
Assaf8211-Mar-08 23:57 
GeneralProblem with Cookie for IE + .net Pin
Adoremi11-Mar-08 23:54
Adoremi11-Mar-08 23:54 
GeneralIs it possible for datagrid inside the datagrid Pin
r aa j11-Mar-08 23:36
r aa j11-Mar-08 23:36 
GeneralRe: Is it possible for datagrid inside the datagrid Pin
eyeseetee11-Mar-08 23:46
eyeseetee11-Mar-08 23:46 
GeneralRe: Is it possible for datagrid inside the datagrid Pin
rajesh200712-Mar-08 0:01
rajesh200712-Mar-08 0:01 
GeneralRe: Is it possible for datagrid inside the datagrid Pin
eyeseetee12-Mar-08 0:33
eyeseetee12-Mar-08 0:33 
GeneralProblem in User Session Pin
nagendrathecoder11-Mar-08 23:24
nagendrathecoder11-Mar-08 23:24 
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 suppose "abc" from one computer in a 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 as well as username listing of "xyz" user and i am not being able to see "abc" user's content then. Both pages are showing contents of "xyz" user.

If i login with another user say "pqr" on different page without logging out first two users, then all three pages displays the contents of "pqr" user.

I am not getting where the actual problem is, please anyone of u can help me with this?

Here is my code......

private void BtnSubmit_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.

Thanks,
Nagendra.
GeneralRe: Problem in User Session Pin
eyeseetee11-Mar-08 23:26
eyeseetee11-Mar-08 23:26 
GeneralRe: Problem in User Session Pin
nagendrathecoder11-Mar-08 23:32
nagendrathecoder11-Mar-08 23:32 
GeneralShow ImageButton is Disabled Pin
Brady Kelly11-Mar-08 23:18
Brady Kelly11-Mar-08 23:18 
GeneralRe: Show ImageButton is Disabled Pin
eyeseetee11-Mar-08 23:24
eyeseetee11-Mar-08 23:24 
GeneralRe: Show ImageButton is Disabled Pin
Brady Kelly11-Mar-08 23:42
Brady Kelly11-Mar-08 23:42 
GeneralRe: Show ImageButton is Disabled Pin
eyeseetee11-Mar-08 23:44
eyeseetee11-Mar-08 23:44 
GeneralRe: Show ImageButton is Disabled Pin
Brady Kelly12-Mar-08 0:13
Brady Kelly12-Mar-08 0:13 
GeneralProblem with the Dropdownlist Pin
meeram39511-Mar-08 23:14
meeram39511-Mar-08 23:14 
GeneralRe: Problem with the Dropdownlist Pin
Chetan Patel11-Mar-08 23:19
Chetan Patel11-Mar-08 23:19 
GeneralRe: Problem with the Dropdownlist Pin
meeram39512-Mar-08 0:28
meeram39512-Mar-08 0:28 
Questionhow to add button in footer of datagrid whichis visible on last paging? Pin
rahul.net1111-Mar-08 23:02
rahul.net1111-Mar-08 23:02 
GeneralRe: how to add button in footer of datagrid whichis visible on last paging? Pin
eyeseetee11-Mar-08 23:06
eyeseetee11-Mar-08 23:06 
GeneralRe: how to add button in footer of datagrid whichis visible on last paging? Pin
rahul.net1111-Mar-08 23:11
rahul.net1111-Mar-08 23:11 
GeneralRe: how to add button in footer of datagrid whichis visible on last paging? Pin
eyeseetee11-Mar-08 23:44
eyeseetee11-Mar-08 23:44 
GeneralRe: how to add button in footer of datagrid whichis visible on last paging? Pin
rahul.net1111-Mar-08 23:49
rahul.net1111-Mar-08 23:49 
QuestionERROR : URI formats are not supported Pin
Trishul Tandel11-Mar-08 22:51
Trishul Tandel11-Mar-08 22:51 
GeneralRe: ERROR : URI formats are not supported Pin
Chetan Patel11-Mar-08 23:15
Chetan Patel11-Mar-08 23:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.