如果应用程序中已存在会话ID,如何创建新会话? [英] How to create new session if session id is already exist in application?

查看:73
本文介绍了如果应用程序中已存在会话ID,如何创建新会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

How to create or generate new session id if the session id already exist in application?
To where I have to implement method in mvc4 to regenerate new session id?

推荐答案

使用Session.Abandon()方法。



https://msdn.microsoft.com/en-us/library/system.web.sessionstate。 httpsessionstate.abandon(v = vs.110).aspx [ ^ ]
Use Session.Abandon() method.

https://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.abandon(v=vs.110).aspx[^]


这篇关于如果应用程序中已存在会话ID,如何创建新会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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