1. there are two main types of Web Services, asmx web service and WCF web service. the latter is the enhanced feature version of the former. for example, the former only supports the HTTP protocol and can only be built on IIS, and security also depends on IIS. The latter also supports MSMQ and Enterprise Service (which seems to be mainly for com, some additional configurations (for example, two-way message transmission can be configured), and multiple endpoints can be set so that the same service can be accessed in different ways. can be created on Windows service or ConsoleProgramThe so-called self-hosting. There are several intermediate products between the two, such as the asmx Web Service attached with the soap extension and the later WSE.
2. the basic concept of Web Service is: the client and the server interact with each other through XML, and the XML and object are converted through serialization and deserialization at both ends. the server uses XML descriptions (such as standard WSDL) for the interfaces called by the customer. The customer generates a local proxy based on the description, sends a SOAP message to the server through the proxy, and calls the service.
3. asmx Web Service
1) configuration on IIS: For iis6.0, you need to create a virtual directory pointing to the directory where the asmx file is located. if it is iis7.0, a new site is created. if ASP. net is installed before IIS, so you need to run Windows \ microsoft.net \ framework \ v2.0.57 (assuming that you use reg_iis.exe-I under Asp.net 2.0133 to register Asp.net. if you cannot recognize asmx, associate asmx with aspnet_isapi.dll in IIS. after IIS is restarted, The asmx can be correctly parsed.
2) Basic Structure: The server needs an asmx file. The following is an example. The content is very simple: Directive: <% @ WebService Language = "C #" codebehind = "~ /App_code/service. cs "class =" service "%> real implementationCodePut it in the service. CS file.