Multiple Dataportal hosts

Multiple Dataportal hosts

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


bBuilder posted on Monday, February 26, 2007

Hi,

I have an application that requieres to access two dataportal hosts but I don't know how to configure this. I have a server where exists some business objects and an other server where exists other business objects that provides diferent services, also I have an client application that requieres to use the business objects of the two servers but I only can configure only one server:

<appSettings>

<add key="CslaAuthentication" value="Windows" />

<add key="CslaDataPortalProxy" value="Csla.DataPortalClient.RemotingProxy, Csla"/>

<add key="CslaDataPortalUrl" value="http://localhost/RemotingPortal.rem"/>

</appSettings>

Is valid to add multiple URLs in the CslaDataPortalUrl parameter?

Thanks!!!

ajj3085 replied on Monday, February 26, 2007

Its not supported out of the box, but I think other's have done this.  Search the forum..

xal replied on Monday, February 26, 2007

You can change the url on the fly from within your code like this:

ConfigurationManager.AppSettings("CslaDataPortalUrl") = "http://NewUrl...."


Andrés

hurcane replied on Monday, February 26, 2007

Of course, the new URL could come from a different configuration setting, if a hard-coded value is not sufficient. Assuming MyObject1 and MyObject2 come from different portals, but the deployment is still in control of the specific URLs...

MyObject1 could have the line:
ConfigurationManager.AppSettings("CslaDataPortalUrl") = ConfigurationManager.AppSettings("UserPortal1Url")

MyObject2 could have the line:
ConfigurationManager.AppSettings("CslaDataPortalUrl") = ConfigurationManager.AppSettings("UserPortal2Url")

Copyright (c) Marimer LLC