Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Information getting shared.

Information getting shared.

Scheduled Pinned Locked Moved ASP.NET
helpquestion
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CodyGen
    wrote on last edited by
    #1

    Hello to all, Is there anyone out there can shed a light why the information is getting shared between two or more users when they are signed on simultaneously? The problem is this, I created a web application where a user can sign on. I used session variables not cookies. When another user signs on to this web application and somehow any of the user save information they typed, it appears that the information getting saved is crossed over to the other user. It looks like they are sharing the same session. I am sorry that is the clearest way I could explain it. Thanks! :-)

    K N 2 Replies Last reply
    0
    • C CodyGen

      Hello to all, Is there anyone out there can shed a light why the information is getting shared between two or more users when they are signed on simultaneously? The problem is this, I created a web application where a user can sign on. I used session variables not cookies. When another user signs on to this web application and somehow any of the user save information they typed, it appears that the information getting saved is crossed over to the other user. It looks like they are sharing the same session. I am sorry that is the clearest way I could explain it. Thanks! :-)

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      That doesn't make sense with session, but it would with Application variables. I am guessing you have a state problem with your app. A user is saving some stuff and then whoever does the next save also gets that stuff. Ben

      1 Reply Last reply
      0
      • C CodyGen

        Hello to all, Is there anyone out there can shed a light why the information is getting shared between two or more users when they are signed on simultaneously? The problem is this, I created a web application where a user can sign on. I used session variables not cookies. When another user signs on to this web application and somehow any of the user save information they typed, it appears that the information getting saved is crossed over to the other user. It looks like they are sharing the same session. I am sorry that is the clearest way I could explain it. Thanks! :-)

        N Offline
        N Offline
        N a v a n e e t h
        wrote on last edited by
        #3

        CodyGen wrote:

        When another user signs on to this web application and somehow any of the user save information they typed, it appears that the information getting saved is crossed over to the other user.

        How they are saving information ? is it in sessions ? Show your code


        My Website | Ask smart questions

        C 1 Reply Last reply
        0
        • N N a v a n e e t h

          CodyGen wrote:

          When another user signs on to this web application and somehow any of the user save information they typed, it appears that the information getting saved is crossed over to the other user.

          How they are saving information ? is it in sessions ? Show your code


          My Website | Ask smart questions

          C Offline
          C Offline
          CodyGen
          wrote on last edited by
          #4

          Thanks for all of your reply. This doesn't happen all the time. So I am also thinking about concurrency problem. Here is the code. I used MyGeneration Doodads.

          = Convert.ToInt32(Right(vwhhm.NameID.Trim(), 2)); name.MoveNext(); } Array.Sort(intsuffix); string strsuffix = (intsuffix[name.RowCount - 1] + 1).ToString(); if(strsuffix.Trim().Length<2) { strsuffix = "0" +strsuffix; } return _NameID + strsuffix; } else { return _NameID + "01"; } } private sub ProcNames() { nameid = Session["NAMEID"].ToString(); if(UpdateNames(nameid, GenerateNewID(Session["NAMEID"].ToString()), txtFname.Text, txtLname.Text)) { Response.Write("Saved Successfully."); } } private Boolean UpdateNames(string _NameID, string NewID, string FirstName, string LastName) { TransactionMgr tx = TransactionMgr.ThreadTransactionMgr(); try { NameLists namelist = new NameLists(); nameList.AddNew(); namelist.NameID = _NameID.ToUpper(); namelist.NewID = NewID.ToUpper(); namelist.FName = FirstName.ToUpper(); namelist.LName = LastName.ToUpper(); tx.BeginTransaction(); namelist.Save(); tx.CommitTransaction(); return true; } catch(Exception ex) { tx.RollbackTransaction(); TransactionMgr.ThreadTransactionMgrReset(); return false; } }
          The flow is generate a new name by putting a number suffix at the end of the original name. If there existing name, it would increment the number. So "name" will be "name01","name02" etc... I also use "private static string ". Is that the best way to declare a variable or just have it as pri

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups