How to implement a Web Service in C#
I want to implement a Web Service in C#. Basically, expose some methods to my clients开发者_如何学运维 through a Web Service
Is there an easy example of how can I do this?
How should I declare the methods, classes, etc?You want to look at Windows Communication Foundation (WCF) web services. This is the latest implementation of services on the .NET stack.
Eric White has a great "File > New..." blog on getting started.
http://blogs.msdn.com/b/ericwhite/archive/2010/05/11/getting-started-building-a-wcf-web-service.aspx
Here there are some examples:
http://www.codeproject.com/KB/webservices/myservice.aspx
http://www.15seconds.com/issue/010430.htm
http://blogs.sitepoint.com/net-web-services-5-steps/
精彩评论