Runtime changing of client WCF endpoint address

Runtime changing of client WCF endpoint address

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


TheEld posted on Wednesday, March 25, 2009

My client app using the WCF data-portal has a standard <endpoint address="______", etc...> in the app.config file.  I then have CommandBase object that executes against the configured address.  Based on the user logging in this object will return a different address to use for all further work.

 

How do I re-configure the endpoint address so that all further CSLA data-portal activity uses the new address?

 

YOUR HELP IS GREATLY APPRECIATED.

 

RockfordLhotka replied on Wednesday, March 25, 2009

Subclass the CSLA WcfProxy class to create your own WcfProxy. You'll find that a subclass can manipulate things like the endpoint name, or can even override the way the WCF channel factory and/or proxy are created.

Then just configure the data portal to use your WcfProxy class on the client, and you should be set.

Copyright (c) Marimer LLC