how to use tcpchannel with csla

how to use tcpchannel with csla

Old forum URL: forums.lhotka.net/forums/t/2751.aspx


virik posted on Sunday, April 22, 2007

Hi all.

I have read the book (expert c# 2005 bo) and trying to practically understand the csla framework.
Actually i am very glad for this framework.

the only problem is how to use the tcpchannel as a remoting channel. not the httpchannel.
I miss the point where to start with this implementation.

Can someone give me a practicall hint/help in this issue?

thanks.

RockfordLhotka replied on Monday, April 23, 2007

You'll need to create your own custom host, because you can't host the tcp channel in IIS. Typically this would be a Windows service, but you could do it as a console app, or Windows app as well - though not in a server environment. Obviously you'll configure the custom host to listen on a tcp:// address. Ingo Rammer's book, Advanced .NET Remoting, probably has the info you need to do this.

Then on your client, just use a tcp://address-to-the-service/DataPortal.rem style address to reach the server.

virik replied on Monday, April 23, 2007

Thank you for your answer! It is very helpful!

Could you tell me shortly how to bind this component with your CSLA framework?

RockfordLhotka replied on Monday, April 23, 2007

All you need to do is create a custom host that listens on the tcp channel, where you directly expose the Csla\DataPortal\Hosts\RemotingPortal class as a SingleCall component. If you look at how this is done with IIS/ASP.NET in Chapter 4 you'll get the idea - but you need to do it somewhat differently in a custom host than in ASP.NET - which is where Ingo's book will likely be helpful.

Copyright (c) Marimer LLC