Mono: WebServices development

zhaozj2021-02-16  105

Mono: WebServices development

As we have learned using the Monodevelop development console program and GTK # / gnome / glade program, and learning if the ASP.NET program is developed on Mono. This tutorial doesn't teach you if you develop an ASP.NET program, so if you don't understand the ASP.NET program, go to MSDN documentation first. This tutorial focus is if using mono to develop the corresponding .NET program, the examples will be the simplest example.

Ok, if you develop an ASP.NET program, you can throw it directly in the configured directory on Apache. The compiled assembly is placed in a bin directory. Is the ASPX file and a Windows file, is it too simple?

The WebServices program is also the same, and the following is a simple example, and the test example of XSP has a demo of WebServices, as shown in Figure 2.8.0.

Figure 2.8.0

Start a new solution, create a new file:

Figure 2.8.1

Write a simple SayHello method to enter the name and return to the Hello username.

Figure 2.8.2

Save this file into our test directory, file suffix is ​​asmx.

Open the browser, access http://localhost/demo/hello.asmx, will display this WebService we have developed.

Figure 2.8.3

转载请注明原文地址:https://www.9cbs.com/read-11245.html

New Post(0)