I’m in the process of making a system for a client that manages data in a particular way. (What it does isn’t really relevant to my question). The environment seems to recommend a silverlight based solution, (many possible clients) but running IIS on the accessible server could be tricky, maybe even impossible due to the restrictions, and due to the fact I can’t actually access the system to make changes to the web.config, if I did get it set up. (I’d have to provide one and hope it works, and randomly guess at changes if it didn’t). So I’m attempting to build the server-side stuff into a .Net 4 (WPF) app, and expose Silverlight compatible WCF services from there.
How do I expose a silverlight compatible service? By the way, I’ll be getting the thing to cover port 80 to share the XAP and crossdomain.xml (and an index page). I assume I’d be wise to somehow share the service metadata through here too?
(Silverlight 4, .Net 4)
P.S. If you think the IIS config bit is ridiculous, you should see how the data is imported! :S
Thanks!
For anyone else wondering about this, I simply created a self-hosted WCF service. Makes a good googling point, or even here on SO.
Here’s a sample of what I’m talking about though:
This example was semi-copied from the self hosted service sample that is in the VS2010 online gallery.
The IClientAccessPolicy interface:
Hopefully you should be able to follow that. Just make sure your core service inherits IClientAccessPolicy and returns a valid one.