How to Split CSLA 4 DataPortal between two different remote servers

How to Split CSLA 4 DataPortal between two different remote servers

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


JonStonecash posted on Thursday, June 03, 2010

I am working on an application that needs to access data locally as well as remotely.  I have built a class that implements IDataPortalProxyFactory and loads up the WcfProxy class if remote access is needed and LocalProxy otherwise.  I have not gotten it work yet, but it seems simple enough.

I may also have a situation coming up in which I need to pick between two different remote servers, that is, the same service but running on different machines.  My brief look at the CSLA code suggests that there is a single WCF URL value for the application.  That, iin turns, suggests that there is no way to use two different versions of the WcfProxy.

Is this correct?  Any suggestions about how to have the application talk to more than one remote server?

Jon Stonecash

 

RockfordLhotka replied on Thursday, June 03, 2010

You need to create a subclass of WcfProxy - you can then override the URL, or even the methods that create the proxy and/or proxy factory.

Copyright (c) Marimer LLC