Windows Vista Forums

Persistent collection in service?
  1. #1


    Mike Guest

    Persistent collection in service?

    Hi,



    I have the following scenario and problem.



    What I have I s WCF service hosted inside a Windows Application, which
    is the server components.

    I also have a client application, another windows app.

    The client application calls a service method called AuthenticateUser(),
    if it succeeds return true, else return false.

    What I want is the server windows app (the one that host the service on
    the server side) to some of the action taken by the client apps.

    For example, every time that a client authenticates, I want the server
    application to maintain in its main windows a list of all the people
    Authenticated.



    How can I achieve this?

    Should all the functionality be in the service, like a collection with
    the client IDS of the authenticated people?

    Or it should be on the server app?



    I'm a bit confused on how to achieve this.





    Please help.



    Thanks,

    Mike








      My System SpecsSystem Spec

  2. #2


    Vadym Stetsiak Guest

    Re: Persistent collection in service?

    Hello, Mike!

    WCF Service is only used for communication, it provides data. Application
    logic that handles these data has to be separate from the service code

    One of the reasons why data handling layer (in your case its persistent
    collection) must be separated from service is that
    communication layer can change. While logic that handles data usually
    remains the same.
    --
    With best regards, Vadym Stetsiak.
    Blog: http://vadmyst.blogspot.com

    You wrote on Thu, 11 Oct 2007 02:57:14 -0400:

    M> Hi,



    M> I have the following scenario and problem.



    M> What I have I s WCF service hosted inside a Windows Application,
    M> which is the server components.

    M> I also have a client application, another windows app.

    M> The client application calls a service method called
    M> AuthenticateUser(), if it succeeds return true, else return false.

    M> What I want is the server windows app (the one that host the service
    M> on the server side) to some of the action taken by the client apps.

    M> For example, every time that a client authenticates, I want the
    M> server application to maintain in its main windows a list of all the
    M> people
    M> Authenticated.



    M> How can I achieve this?

    M> Should all the functionality be in the service, like a collection
    M> with the client IDS of the authenticated people?

    M> Or it should be on the server app?



    M> I'm a bit confused on how to achieve this.





    M> Please help.



    M> Thanks,

    M> Mike








      My System SpecsSystem Spec

  3. #3


    Joe-P Guest

    RE: Persistent collection in service?

    If I understand correctly you want to persist authenticated users so that
    every call that is done after the first authentication should pass without
    doing the same action again.
    First its not good practise for the hosting server to have any other
    logic. It should all be handled by the service. But the security in WCF is
    handled by the host. There are Message level and Network level
    authentication. You may want use the Network level authentication available
    in it. You can also extend this feature by extending the security channel and
    have your own custom binding which is easy. If you extend it then you can
    store in more persistent medium. But you may need to look at scalability.

    Hope this is helpfull !

    Thanks,
    Joe

    "Mike" wrote:

    > Hi,
    >
    >
    >
    > I have the following scenario and problem.
    >
    >
    >
    > What I have I s WCF service hosted inside a Windows Application, which
    > is the server components.
    >
    > I also have a client application, another windows app.
    >
    > The client application calls a service method called AuthenticateUser(),
    > if it succeeds return true, else return false.
    >
    > What I want is the server windows app (the one that host the service on
    > the server side) to some of the action taken by the client apps.
    >
    > For example, every time that a client authenticates, I want the server
    > application to maintain in its main windows a list of all the people
    > Authenticated.
    >
    >
    >
    > How can I achieve this?
    >
    > Should all the functionality be in the service, like a collection with
    > the client IDS of the authenticated people?
    >
    > Or it should be on the server app?
    >
    >
    >
    > I'm a bit confused on how to achieve this.
    >
    >
    >
    >
    >
    > Please help.
    >
    >
    >
    > Thanks,
    >
    > Mike
    >
    >
    >
    >
    >
    >
      My System SpecsSystem Spec

Persistent collection in service? problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: NFS mount as persistent or as a service? Curtiss W. Server General 0 15 Dec 2009
persistent cookies stephen buck Vista General 1 29 May 2008
3rd time asking ( I'm a persistent sob ) t-4-2 Vista performance & maintenance 13 05 May 2008
persistent state KRK Vista General 1 02 Mar 2008
Persistent routes balsup Vista networking & sharing 1 13 Jun 2007