ABSTRACT

This chapter examines some of the RESTful web services provided by the Microsoft.NET libraries. It discusses how Windows Communication Foundation (WCF) can be used to implement RESTful web services. The chapter looks at ASP.NET MVC, and finally at ASP.NET CORE 1.0. With regard to ASP.NET Core 1.0. WCF uses WebHttpBinding together with WebHttpBehavior to provide a RESTful web service. WebHttpBehavior uses Hypertext Transfer Protocol (HTTP) commands directly to transfer data, rather than running some other protocols on top of HTTP. Similarly, it uses plain Extensible Markup Language (XML) as its default data format as the format of the data it sends and receives. Microsoft provides a special version of a Self-Host to be used to self-host web services. This class is called WebServiceHost. It defines a web endpoint automatically. This web endpoint is automatically configured with WebHttpBinding and WebHttpBehavior. The Web HTTP Programming model provides a web service that can be accessed by many different kinds of clients.