I have my custom httphandler which calls a wcf service. By Service returns a Stream
[OperationContract]
Stream GetMyStream(int width, int height);
I am calling the http handler in my aspx page from an image tag:
<asp:Image ID="imgStream" runat="server" ImageUrl="MyStreamHandler.ashx" Visible="true" />
In my handler, I have a reference to the WCF service and I am calling the operation as below:
MyServiceClient tcpClient = new MyServiceClient();
Image img = Image.FromStream(tcpClient.GetMyStream(30,100));
I am using NetTcp binding in my service. Now, I can call the http handler in my aspx page through jquery ajax and display the stream in the image tag so as to avoid post backs on the page.
Thanks.