Results 1 to 2 of 2

Thread: Client info pass to WCF

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2009
    Posts
    3

    Client info pass to WCF

    Hi~
    i get a problem, i want to pass client info to wcf , it's easy to do by calling method to do that.

    client program as : wcfserviceInstance.setclientInfo(name,ip,age,sex)

    but the problem is , i have 60 methods in wcf service , and i don't want every method look like this :
    wcfserviceInstance.methodA(name,ip,age,sex,methodA_param)
    wcfserviceInstance.methodB(name,ip,age,sex,methodB_param)
    ......


    is there any solution can do it (wcfserviceInstance.methodB(methodB_param)) ?

    can i just setting something , and every wcfserviceInstance.method can read client info by it's own in wcf service side.

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Client info pass to WCF

    You could have a Shared list (Static in C#) in the WCF service side code and then a WCF method that your clients can call that adds a client to that list with a unique ID and adds all of their information - then in every other WCF method that the clients call you just pass in the client's unique ID and the server retrieves the information from that client from the shared list
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width