开发者

WCF Service and Properties

Here is my question, I have a 开发者_开发知识库solution with 4 projects in it for a WCF Service :

  1. DLL Library : Service Interface.
  2. DLL Library : Service Code.
  3. Form Application : Service hosting application.
  4. Form Application : Service client application.

I'd like to have certain properties of the service accessible for the hosting application but not for the client one. If I declare a property in the client interface they will both have access to it.

In fact, my service manage user identity login and keep a list of all user currently logged in. I'd like to be able to show this list in the Hosting application, like a debugging tool. But I don't want the service client to be able to access to this list.

How can I do ?

Thank in advance.


You can put put that code into "2" (service code). Since you only share an interface with the client it will not be exposed.

Also, if that logic (authentication and authorization) is "hosting app" specific maybe it should be in the hosting app itself rather than a service code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜