locked
WCF callback reference RRS feed

  • Question

  • Hi All,

     To work with WCF callback the client application should implement the callback interface and should pass the InstanceContext to the Duplex channel to create communication with the WCF service.

     Does it possible to use WebParts as the clients(Subscribers), if so then each webpart will act as a subscriber?

    Does it possilbe to extract the client endpoint information from the callback contract in the service side?

    Does it possible to persist the callback reference in the database and can use the callback reference from the database to call the client?

    Thanks,

    R.Prakash

    Tuesday, August 23, 2011 5:55 PM

Answers

  • Hello, I assume you mean ASP.NET WebParts? In this case, it is the same as invoking a duplex service in a normal ASP.NET application. That is, please do not take the approach... An ASP.NET application runs on the server. The browser issues a request to ASP.NET, and then wait for ASP.NET to respond. On the server side, if your ASP.NET application consumes a duplex service, the response will be returned to the browser as soon as the request to the duplex service is made. ASP.NET will not wait for the request to complete. After the duplex service returns a response to ASP.NET, the ASP.NET application can indeed work on the response, but it is unable to push the response to the browser. So please do not invoke duplex/async services in an ASP.NET application.

    I'm not sure what you mean by extracting the client endpoint information. The client must use the same binding as the service. So the service should know the client binding beforehand.

    You cannot persist callback references in databases. This will terminate the connection, and the connection cannot be reestablished. The client must initiate a new connection.


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    • Marked as answer by Yi-Lun Luo Tuesday, August 30, 2011 9:52 AM
    Friday, August 26, 2011 1:58 AM

All replies

  • Tagging along for ride! Thanks!


    JP
    Tuesday, August 23, 2011 6:11 PM
  • Hello, I assume you mean ASP.NET WebParts? In this case, it is the same as invoking a duplex service in a normal ASP.NET application. That is, please do not take the approach... An ASP.NET application runs on the server. The browser issues a request to ASP.NET, and then wait for ASP.NET to respond. On the server side, if your ASP.NET application consumes a duplex service, the response will be returned to the browser as soon as the request to the duplex service is made. ASP.NET will not wait for the request to complete. After the duplex service returns a response to ASP.NET, the ASP.NET application can indeed work on the response, but it is unable to push the response to the browser. So please do not invoke duplex/async services in an ASP.NET application.

    I'm not sure what you mean by extracting the client endpoint information. The client must use the same binding as the service. So the service should know the client binding beforehand.

    You cannot persist callback references in databases. This will terminate the connection, and the connection cannot be reestablished. The client must initiate a new connection.


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    • Marked as answer by Yi-Lun Luo Tuesday, August 30, 2011 9:52 AM
    Friday, August 26, 2011 1:58 AM