开发者

Is there some sort of accessible "Session ID" that both the Client and Server know of within a WCF Service call?

开发者 https://www.devze.com 2023-03-06 16:07 出处:网络
Looking for 开发者_运维技巧this session identifier for logging purposes...Generally WCF services should be stateless.The default is for them to be stateless without a session id that would tie the ser

Looking for 开发者_运维技巧this session identifier for logging purposes...


Generally WCF services should be stateless. The default is for them to be stateless without a session id that would tie the server to the client. Unless you have a really good reason (outweighing the performance hits) to maintain state, I'd keep them stateless and sessionless.

That said, you can have per-session WCF services which will allow you to do what you're asking.

This article (link) goes into some detail on instance management with WCF.

For in-depth discussion, take a look at Chapter 4 in Juval Lowy's Programming WCF Services (link) which is all about state management in WCF services.

0

精彩评论

暂无评论...
验证码 换一张
取 消