Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Manual implementation of WCF Duplex Proxy

Manual implementation of WCF Duplex Proxy

Scheduled Pinned Locked Moved WCF and WF
csharpwcfsysadminhelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lordavenger
    wrote on last edited by
    #1

    Hey there! I'm trying to manually create a duplex proxy class for a WCF client/server application. Unfortunately there is no info about it on the net :( Has anyone ever tried it and if can you post a nice and clean solution? I have separated my contract, service implementation, host, proxy and client application in separate assemblies. And now it looks like I will need to duplicate the contract interfaces at the client proxy in order to have async invocation of the methods. Please help!

    C 1 Reply Last reply
    0
    • L lordavenger

      Hey there! I'm trying to manually create a duplex proxy class for a WCF client/server application. Unfortunately there is no info about it on the net :( Has anyone ever tried it and if can you post a nice and clean solution? I have separated my contract, service implementation, host, proxy and client application in separate assemblies. And now it looks like I will need to duplicate the contract interfaces at the client proxy in order to have async invocation of the methods. Please help!

      C Offline
      C Offline
      christoph brandle
      wrote on last edited by
      #2

      well this is possible to do. in our upcoming solution we just do it. unfortunately I connot post all the code, is too much tight in our custom solution, but a little peace of the essential Helper: SharedProxyBaseDuplex<T,C> ContractDescription contractDesript = ContractDescription.GetContract(EContract.IDuplexRouterService.FullType); ServiceEndpoint serviceEndpoint = new ServiceEndpoint(contractDesript, binding, endpointAddress); lock (_channelLock) { CallbackObject = callbackObject == null ? new C() : (C)callbackObject; InnerFactory = new DuplexChannelFactory<T>(new InstanceContext(null, CallbackObject), serviceEndpoint); } I recommend you to invest 5 days an go to see a WCF Master Class by iDesign, is really getting you closer to the subject. Cheers, Christoph

      L 1 Reply Last reply
      0
      • C christoph brandle

        well this is possible to do. in our upcoming solution we just do it. unfortunately I connot post all the code, is too much tight in our custom solution, but a little peace of the essential Helper: SharedProxyBaseDuplex<T,C> ContractDescription contractDesript = ContractDescription.GetContract(EContract.IDuplexRouterService.FullType); ServiceEndpoint serviceEndpoint = new ServiceEndpoint(contractDesript, binding, endpointAddress); lock (_channelLock) { CallbackObject = callbackObject == null ? new C() : (C)callbackObject; InnerFactory = new DuplexChannelFactory<T>(new InstanceContext(null, CallbackObject), serviceEndpoint); } I recommend you to invest 5 days an go to see a WCF Master Class by iDesign, is really getting you closer to the subject. Cheers, Christoph

        L Offline
        L Offline
        lordavenger
        wrote on last edited by
        #3

        Thanks a lot for the reply! I have actually made my way using a sample code generated by VS for a duplex proxy. Then I realized that my problem is not the duplex part, but the async invocation of the methods and the async client side contract. Anyway I solved the issue. Your approach with generic proxy looks very nice :) Thanks for sharing! Cheers, Vik

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups