This sample creates a simple WCF calculator service and builds an ASP.NET AJAX client page for it. The client page is then hosted alonside the service in the Azure fabric. Here is a quick walkthrough of the steps taken to build this solution:
- Create new Web Cloud Service project called Calculator
- In the Calculator_WebRole website, add a new WCF Service called Service.svc. In Web.config file, configure the service with WebScriptEnablingBehavior and configure the endpoint with WebHttpBinding so it can be used by ASP.NET AJAX clients
- Create an ASP.NET page to host the client code. Use JavaScript to instantiate the proxy and call operations on it
Demo Client | Demo Service Here is the final result showing the ASP.NET AJAX client accessing the service:
|