是NewSession始终返回true但具有会话ID吗? [英] IsNewSession returning true always but has a session ID?

查看:69
本文介绍了是NewSession始终返回true但具有会话ID吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我是正确的,这意味着会话已超时?但是在web.config中将其设置为30分钟,并且其创建和再次调用之间的时间差约为一分钟.

首先,我认为这是因为我使用的是通用处理程序.但是现在我正在调用Web表单,并且它也做同样的事情.认为这与从ajax发出请求有关.

任何建议将不胜感激.

If Im correct this means that the session has timeout? But in web.config is set to 30 minutes and the differences between the time its created and called again is about a minutes.

First I thought it was because I was using a generic handler. But now Im making the call to a web form and it does the same. Think it has to do with making the request from ajax.

Any suggestions will be appreciated.

推荐答案

如果您正在调用Web服务,请确保添加
If you are calling a webservice make sure you add
[WebMethod(EnableSession = true)]


到您的功能.


to your function.


这篇关于是NewSession始终返回true但具有会话ID吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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