开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜