Ant
no notes

Calling WCF Service from a WHS Add-in

WCF stores the binding info in the App.config, so if you wish to call a service from an add-in you would have to somehow get your add-in config into the WHS host config.

This would mean a merge on setup, not something I'd relish doing. After all logically its not my config and I don't want to mess arround with it.

As with everything, there is another way... create a second AppDomain and call your services there.

AppDomain.CreateDomain()

Horrah!

Well, not quite, it does leave you with some restrictions.

Because this is a form of Remoting, the objects instanciated and passed between the domains must be serializable, WCF objects generally are not. So create an object deriving from MarshalByRefObject and do all your work in that.

check out this for more detail
Using Multiple App.Config Files in .NET

If your developing for WHS, here's a great starting point
WHS Dev Tips

Post a Note

(required)

(required never shown)

On Twitter Follow MrAntix on Twitter

11 hours ago
verge
Microsoft teases Windows 8 'Consumer Preview' with Bing betta fish site http://t.co/lcJICazH