如何使用web服务共享的Web应用程序会话 [英] How to share the web application session with a webservice

查看:125
本文介绍了如何使用web服务共享的Web应用程序会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的情景。我的页面加载在会话特定对象。用户点击一个按钮,我需要更新使用jQuery我的网页的某一部分。 jQuery的将使到需要访问会话中的对象之一Web服务Ajax调用。我会怎么做呢?如何将我的Web服务访问在当前会话对象?

Here's the scenario. My page loads with certain objects in the session. The user clicks a button, and I need to update a certain section of my page using jquery. The jquery would make an ajax call to the web service which needs to access one of the objects in the session. How would I do this? How can my web service access the current session object?

更新:我使用ASMX

update: I'm using asmx

推荐答案

你做的是设置(EnableSession = TRUE)在您的WebMethod属性。

all you do is set (EnableSession = true) on your webmethod attribute.

这篇关于如何使用web服务共享的Web应用程序会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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