Silverlight WcfSlPortal.svc address

Silverlight WcfSlPortal.svc address

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


AndrewVG posted on Monday, January 25, 2010

Hi,

In our dev environment we reference WcfSlPortal.svc using http://localhost:12345/WcfSlPortal.svc in our ServiceReferences.ClientConfig file, however in our pre-production environment we might use http://test.server.com/path/WcfSlPortal.svc

Each time we deploy to the pre-production environment we have to unzip the xap file, update the ServiceReferences.ClientConfig file and then re-zip it.

Is there a better way to do this? Can we programatically set the address of the WcfSlPortal.svc instead of using the address in the SeviceReferences.ClientConfig file?

Regards,

Andrew

RockfordLhotka replied on Monday, January 25, 2010

You can set the URL programmatically by setting the Csla.DataPortalClient.WcfProxy.DefaultUrl property.

Of course the trick is to provide the URL to your app somehow - probably as part of the hosting web page - as a parameter to the <object> tag or via javascript.

Copyright (c) Marimer LLC