开发者

Different wcf services for different tasks in server-client application, Sharing data between services

We are developing a server-client application in c# using wcf services and wpf. We were thinking about 3 different wcf services:

  • service for logging in and out
  • service for getting data from database
  • service for file transfer

The problem is that we want to store currently logged in users in some list. Login service whould store a user with a given temp key and return that key to client. When client calls data service it passes that key and data service should check in the currently logged in user list if it exists. We are stuck at how and where to keep the user list, and how would the data service be aware of it.

We are hosting all three services in wpf application.

We would much appreciate any sugg开发者_运维技巧estion or direction to the solution, Thanks


If the services are hosted in the same process, you can simply use some local dictionary (Dictionary<string, UserData>) in memory (or in a persistent storage, if necessary), and access it via a shared (static) class. Do you need anything more complex than that?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜