I am working on a web service which is going to have both a native WPF client as well as a Javascript based web interface.
While I was working on the service and WPF client, the WCF service has been an IIS hosted WCF service project of its own, and has been working fine. Now that I'm starting to work in earnest on the web interface, I am wondering if keeping the WCF service separate is a good choice.
Reading around on the subject, there seem to be lots of options regarding this; for example, I could:
- Keep the two projects separate
- Create the asp.net MVC website and add an Ajax-enabled WCF service to the project
- Create the asp.net MVC website and add a WCF service to the project
- Create a WCF service library project and have that hosted in the MVC application (not entirely sure about this, but it seems possible)
And I have a feeling there's probably more.
What do you suggest I should do? My goals are:
- Accessing the service from the WCF client using a service reference like I have done so far
- Accessing the service from Javascript on the web interface
- Accessing the service using port 80 from Javascript and the WCF client (to avoid firewall issues)
- Having website and service under the same domain
- Being able to run the thing using shared hosting (Gearhost), without multiple IIS virtual directories/application starting points.