English 中文(简体)
Id Changing Randomly
原标题:Session Id Changing Randomly
  • 时间:2009-10-07 19:35:05
  •  标签:

我有一个简单的伙伴关系。 NET MVC应用程序。 当采用第一个行动方法时,它储存了届会变量中的一些数据。 根据由此形成的观点,我有一条由纽州引发的支离破碎的亚克斯呼吁。

当我点击 but子时,在服务器一侧使用了不同的会议,那是随机的。 有时,在开始和点击纽顿与会议ID之间仍有差距。 这打破了用第一个行动方法储存的数据。

有什么想法? 这两项要求都是相同的。

  1. I see method one instantiate a new session with Id X and store the data.
  2. Immediately after loading the Jquery request fires. I see a different session cookie id on the request header.
  3. I get an error "data not found"

非常感谢

最佳回答

这是根据设计和伙伴关系进行的。 该网络试图在为用户储存会议方面有效率。 除非你在届会期间储存任何东西,否则会议价值会发生变化。

如果你想告诉协会。 您希望跟踪用户会议情况的网络,可以做两件事之一:

  1. Store something in the session.
  2. Simple handle the Session_Start event in your GLobal.asax. The presence of this method will tell ASP.NET to track sessions , even if there is no data in the session..

// NOTE: There is no need to add any thing to session if you are doing this... public void Session_Start(object sender, EventArgs e)
{
}

这种行为在过去给我带来了很多担忧:

问题回答

1. 是否使用同一服务器名称发出所有你AJAX电话:

rel=“nofollow noreferer”>http:// localhost/whatever

v

rel=“nofollow noreferer”>http:///61/6nename/whatever





相关问题
热门标签