Building WebService and Windows services

Source: Internet
Author: User

The construction of WebService

Create an empty project for the ASP. NET Web application (framework) in the Web under new Visual C #

Right-WebApplication1 Add New item, select Web Service (ASMX)

You can make code changes in WebService1.asmx.cs, but remember to [WebMethod] in the first place

Then use the browser to run the code, the following interface appears

Right-click to publish to WebApplication1, publish to local folder

Then open Control Panel to start or close the Windows program, install the Internet Information Service program, and then turn on IIS to add the network.

Then open the browser to access, HTTP://localhost:8091/webservice1.asmx, the following interface appears to be successful installation. Problems that may arise during this visit, install all IIS software for the Internet Information Service.

The building of Windows services

Windows services (. NET Framework) for Windows Classic Desktop under new Visual C #

Write the code in Service.cs and build it, and then modify the service name.

Click the empty space to add the installer, and then click ServiceProcessInstaller1 to modify the account to LocalSystem and regenerate.

Copy the Install.bat into the D:\shixun\new2\WindowsService1\WindowsService1\bin\Debug and use the notepad++ to open the modified

Right-click to run Install.bat as an administrator, and this service appears in the Task Manager's service to make the Windows service successful and to see the results of the written code running locally.

Calling an interface in a service

Click the reference in WindowsService1, select Add Service Reference, regenerate WebService, and then fill in the address into the service reference

Then modify the code, regenerate, delete the original build file, and restart the process.

Database links

After unpacking the package and installing the EXE file, open PL/SQL Developer and click Preferences in Tools

Then put the Tnsnames.ora into the D:\app\client\sun\product\12.1.0\client_1\Network\Admin

Click OK, enter the user name password, select database as Yxtestdb

Re-enter after new a SQL Window, as shown below, will appear automatically prompt just fine

Building WebService and Windows services

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.