This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have been evaluating the new capabilities of LS 4.0 related to distributed applications using the sample poste in this thread: http://www.mindscapehq.com/forums/Thread.aspx?PostID=13330 I have changed a few things there (using SQlite, using pipes for the communication) and things work pretty well. But I need to get rid of the app.config files for both the client and the server (it's a requisite for our app). In the Service part there's no problem as I can create the ServiceHost by hand and configure everything by code. But on the client, I have been unable to configure the DistributedUnitOfWork by code. The only constructor I thought I could use was the one that receives the context and the endPointName, but it seems it searches for that name in the app.config. I have not seen anything in the LightSpeedContext or DistributedUnitOfWork classes to set this by hand, but maybe I am not looking in the right places. Ideally for us, something like the usage of this overload of the ClientBase constructor would be the best scenario: http://msdn.microsoft.com/en-us/library/ms574927.aspx Any ideas? Regards, Vicente |
|
|
You are right that it does require the binding and endpoint configuration to be specified in via app.config, but Ill look at add in an overload where you can pass in the binding/endpoint address objects so they can be used instead. Ill post an update once this will be available in the nightlies.
Jeremy |
|
|
Right, I have added in support for this with the next nightly build (20110328) allowing you to pass a pair of Binding and EndpointAddress instances to specify those concerns rather than using configuration. If you want to use this approach here is an example with the specific changes over how you would use it previously indicated in bold. var binding = new NetTcpBinding(); ... }
The current behavior of course is still valid if you want to use configuration :)
Jeremy |
|
|
Hi Jeremy, I have tried the example with the latest nightly build and this code and it works like a charm :) (had to add also an overload for the DistributedModelUnitOfWork). Thanks a lot for supporting this scenario! Vicente |
|