
338Microsoft Visual Studio 2010: A Beginner’s Guide
a Web application as the Web service client. However, this might not be possible if you are deploying to a hosted server by a
To see how this works, create a new ASP.NET MVC Web site.
Summary
You’ve learned how to build a Web service, how to deploy the Web service, and how to write a client that consumes the Web service. The discussion on creating the Web service showed you how to define the Web service contract with an interface and applicable attributes. You saw how to implement the service also. The deployment discussion explained how to host a Web service with IIS and how to use the VS Publish Wizard for deployment. You also saw how to write a client that creates a reference to a Web service and writes code to communicate with the Web service.