Win Service
- Create win Service
- Write in onstart and onstopCode
- Right-click the win service Form Designer and choose "add installation"
- Set the service name and other attributes in the installation file.
- Generate the win service EXE file.
- Find the installutil.exe file in c: \ windows \ Microsoft. NET \ framework \ v2.0.50727.
- Put the installutil.exe and win service EXE files in the same directory
- Write and install the batch processing file and uninstall the batch processing:
Installation batch processing:
Installutil.exe winservice.exe
Unmount batch processing:Installutil.exe/u winservice.exe
Web Services
This section describes how to use web services.
1. Use the disco tool to find the Web service address:
Disco/out: mydir http://www.proseware.com
If it cannot be found, it will not be discounted. Generally, any Wen service provided by a website will be published to the customer.
Suppose you have now got the Web service address: http://www.HostName/WebServiceName.asmx
2. Generate the WSDL document:
ADD? Access the WSDL.
Http://www.HostName/WebServiceName.asmx? WSDL;
In IE, select "Save As XML" and change the name suffix to "WSDL. Obtain the webservicename. WSDL document.
3. Generate the Web Service proxy class:
Wsdl.exe tool:
WSDL/L: CS/O: F: \ webservicename. WSDL
The parameter/L represents the language, CS is C #,/o represents the output path, and the last parameter is the WSDL file generated in step 2.
If you ignore step 2, you can directly write the Web Service URL in the third parameter of WSDL. That is:
WSDL/L: Vb/O: C: \ myproxyclass. VB http://www.HostName/WebServiceName.asmx? WSDL
4. The proxy class has been generated. If it is webservicename. CS, you can directly add this CS file to the project.
The usage is as follows:
Webservicename webser = New Webservicename ();
Webser. url = Http://www.HostName/WebServiceName.asmx" ;
Webser. Method ();