Call WCF Self-Hosted Service from Separate Web Application


I have a fairly high level question.

Suppose there’s a WCF service project and a web app project in the same solution. The WCF service is self-hosted for DEV purposes. I’d like to call the WCF service from the web app’s client-side script.

Now if the WCF service were deployed on IIS, I’d use a ScriptManager:

<asp:ScriptManager ID=“ScriptManager” runat=“server”>
<asp:ServiceReference Path=“http://<serverhost>/MyWCFService.svc”/>

However I’m not sure how to hook up my web app to a self-hosted WCF service. Is tinkering with the ScriptManager the right approach? Or should I be taking a different route entirely?