WCF Service and Properties
Here is my question, I have a 开发者_开发知识库solution with 4 projects in it for a WCF Service :
- DLL Library : Service Interface.
- DLL Library : Service Code.
- Form Application : Service hosting application.
- 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.
精彩评论