This project has moved. For the latest updates, please go here.

Can't call WCF service

Topics: Other
May 26, 2014 at 12:46 PM
Edited May 26, 2014 at 12:46 PM
When I call the service from test project - all fine
When putting it in 'Ableton Live 9' plugin directory - he can't find the config file
Tried change the config file to '##pluginname##.net.config' and to '##pluginname##.config' with no success
Coordinator
May 26, 2014 at 1:23 PM
I believe WCF only looks at the process config. Rename your config to the name of the ableton .exe and add the .config extension and put it next to the ableton exe (same folder).

I would suggest you hardcode all of the WCF objects and use the plugin config file only for the one or two settings you really want to be configurable...

Hope it helps,
Marc
May 26, 2014 at 1:46 PM
Thanks

Here is the configuration in code for a duplex WCF
        public static ServiceClient CreateServiceClient(IServiceCallback callback = null)
        {
            var b = new NetTcpBinding { ReliableSession = new OptionalReliableSession { InactivityTimeout = TimeSpan.FromMinutes(10), Enabled = true } };
            var ep = new EndpointAddress("net.tcp://----------:84/Service.svc");
            var result = new ServiceClient(new InstanceContext(callback), b, ep);
            return result;
        }