如何在 Restful WCF 服务中管理会话 [英] How to Manage Sessions in Restful WCF Service

查看:45
本文介绍了如何在 Restful WCF 服务中管理会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用我的 Restful WCF 服务的客户端应用程序管理会话.客户端应用程序可以是 J2me 应用程序或 .NET 应用程序.

I want to manage Sessions with client apps of my Restful WCF Service. Client app can be a J2me application or a .NET application.

在 RESTFUL WCF 服务中维护会话的推荐方法是什么?

What is the recommended way of maintaining sessions in RESTFUL WCF service?

想法是识别请求来自已通过身份验证的客户端.

Idea is to recognize that the request is coming from an already authenticated client.

推荐答案

REST 定义交互是无状态的,服务器上不维护客户端状态,因此您希望摆脱 RESTful 界面.

REST defines that the interaction is stateless, no client state is maintained on the server so you are looking to move away from a RESTful interface.

我无法想象您希望在提供 WCF 服务的服务器上维护客户端状态的情况.我认为您需要查看您的架构,因为您可能会给自己带来很多技术债务.

I cannot imagine a situation where you would want to maintain client state on a server that's providing WCF services. I think you need to look at your architecture as you are possibly about to cause yourself a lot of technical debt.

这篇关于如何在 Restful WCF 服务中管理会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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