c# - If I have multiple users on my site at the same time, how do I keep their sessions separate? -


i have created web application , upload on iis(6.1), i'm facing issue, since uploaded onto iis. in application authentication of user done through ad (active directory) group. when user "a" logs application works fine , home page shows welcome message "welcome user : a", problem occurs when user "b" logs application. when user "b" logs in, , user "a" refreshes page, home page of user "a" shows welcome message "welcome user : b". note both users on physical different machines.

can me in issue?

here code : when login page loads, following code executes :

protected void page_load(object sender, eventargs e)     {                     _txtpassword.focus();         lb_errormsg.visible = false;         try         {              if (!page.ispostback)             {                 loghelper.logger.info("load login page.");                 loghelper.logger.info("get employee id , domain variables.");                 _txtuserid.text = user.identity.name;                 string[] str = _txtuserid.text.replace(@"\", "-").split('-');                 configureuser.empid = str[1];                 configureuser.empdomain = str[0];           loghelper.logger.info("set employee id , domain variables complete.");                  loghelper.logger.info("try connectionstring.");                 //set connection string...                 con_string.connectionstring = con_string.getconnectionstring();                 loghelper.logger.info("get connectionstring complete.");             }          }         catch (exception ex)         {          }     } 

in page load, fills employee id in textbox automatically, , asks user password. set employee id in "configureuser.empid" variable.

public void _fillstartupinformation() {     loghelper.logger.info("attempt fill list of bu's");         // fill workstream datatable...         configureuser.budt = businessuser.cpogetbus(con_string.connectionstring);         loghelper.logger.info("fill list of bu's successfully.");      loghelper.logger.info("attempt fill employee datatable.");         // fill employee datatable..         configureuser.employeedt         = businessuser.cpogetallemployees(con_string.connectionstring);         loghelper.logger.info("fill employee datatable successfully.");          loghelper.logger.info("attempt fill employee details variables.");         // fill employee details variables...         datarow[] dr          = configureuser.employeedt.select("empid = '" + configureuser.empid + "'");          configureuser.bu          = configureuser.budt.select         ("buid = '" + dr[0]["bu"].tostring() + "'")[0]["bu"].tostring();          configureuser.empname = dr[0]["empname"].tostring();         configureuser.email = dr[0]["emailid"].tostring();         if (dr[0]["obu"].tostring().contains(','))         {          configureuser.empobu = new string[dr[0]["obu"].tostring().split(',').count()];             configureuser.empobu = dr[0]["obu"].tostring().split(',');         }         else         {             configureuser.empobu = new string[1];             configureuser.empobu[0] = dr[0]["obu"].tostring();         }         configureuser.managername = dr[0]["managersname"].tostring();          configureuser.manageremail          = configureuser.employeedt.select         ("empname = '" + configureuser.managername + "'")[0]["emailid"].tostring();          configureuser.buid = dr[0]["bu"].tostring();         configureuser.isreviewer = convert.toboolean(dr[0]["reviewer"]);          loghelper.logger.info("fill employee details variables completed.");          loghelper.logger.info("attempt fill obu datatable.");         // fill subteam datatable...         configureuser.obudt          = businessuser.cpogetobus(con_string.connectionstring, configureuser.buid);         loghelper.logger.info("fill obu datatable completed.");           loghelper.logger.info("attempt fill product datatable.");         // fill product datatable...         configureuser.productdt          = businessuser.cpogetproducts(con_string.connectionstring, configureuser.buid);         loghelper.logger.info("fill product datatable completed.");          loghelper.logger.info("attempt fill checkpoints definition datatable.");         //fill checkpoints definitions....         configureuser.checkpointsdefinition          = businessuser.cpoget_qccheckpoints_definition(con_string.connectionstring);         loghelper.logger.info("fill checkpoints definition datatable completed.");          loghelper.logger.info("attempt fill process datatable.");         // fill process datatable...         configureuser.processdt         = businessuser.cpogetprocesses(con_string.connectionstring, configureuser.buid);         loghelper.logger.info("fill process datatable completed.");          loghelper.logger.info("attempt fill process hierarchy datatable.");         // fill process hierarchy details...         configureuser.processhierarchydt          = businessuser.cpogetprocesshierarchy         (con_string.connectionstring, configureuser.buid);         loghelper.logger.info("datatable filled successfully.");   } 

after authentication, fill common data used through out application datatables , variables of static type.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -