views:

65

answers:

1

Hi all,

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.

A: 

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.

Vitalik
If I don't put the method(GetUserList() for exemple) in the interface code, the method will not be visible even to the hosting application ?In fact my problem is that I don't see if there is a way to use a service and host it in the same application without running service on a thread and accessing it on another (like a client).What I'd like is the hosting application to have specific state access to the service but not the client.
Karnalta
Why don't you make GetUserList() a part of the hosting application itself?
Vitalik