mvc3中具有多个选项卡的唯一会话ID [英] Unique session id with multiple tabs in mvc3

查看:74
本文介绍了mvc3中具有多个选项卡的唯一会话ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1.  User A opens an IE instance and logs into a website and requested for an account details for one of the account/telephone number. Dashboard application internally holds the account details in a session.
2.  User A opens another tab and tries to access the same website (Without logging in), as the user is already inside the session.
3.  In this case, it is clear that the same session is shared between the tabs with the recently requested account details.
4.  ASP.NET offers a simple solution by enabling a key in the config file. Below is the sample code.
              <sessionState mode="InProc" cookieless="true"></sessionState>
5.  This setting basically appends the Session to the URL of the browser, so your typical URL looks like http://MyApp/(S(afdg3ires1ik0lmjm3pkjtzl))/default.aspx    where the highlighted portion manages the session identification.
6.  By this way, one user can open multiple tabs and look for different account details with effecting the other account details in other tabs. Each tab maintains its own session information.
7.  The only issue with this would be the URL change. Some session information would be appended to the existing URL.





我的要求在这里:

我想要用不同的用户数据维护不同的选项卡而不使用cookieless =true。



有没有解决办法?



My requirement is here:
I want to maintain different tabs with different user data with out using cookieless="true".

Is there any solution for that ?

推荐答案

会话是基于cookie的,所以如果标签维护共享会话,则归结为每个浏览器如何实现标签和cookie。使用无cookie会话引入了许多问题,如安全问题,SEO问题等,并且很少是有效的解决方案,当然不是这个问题。



没有真正的控制客户端cookie实现的方法和网络设计为无状态,所以只要让人们使用尽可能多的选项卡,它就没关系了。



http://forums.asp.net/post/5825784.aspx [ ^ ]
Sessions are cookie based so if tabs maintain a shared session comes down to how each browser implements tabs and cookies. Using cookieless sessions introduces a lot of problems such as security issues, SEO issues etc and is rarely a valid solution for anything, certainly not this issue.

There is no real way to control client implementation of cookies and the net is designed to be stateless so just let people use as many tabs as they want, it doesn't really matter.

http://forums.asp.net/post/5825784.aspx[^]


这篇关于mvc3中具有多个选项卡的唯一会话ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆