How does the flow of a Web Service work?

Asked

Viewed 292 times

-3

I need to develop a web service, and its main idea is client-server communication.

But I do not understand how this would be done using the MVC architecture and using the C#language, will have the need for a local server with Apache?

2 answers

0

How the flow of a Web Service works?

The working principle may well be answered for this excellent question and its answers, a few more additions.

There are several protocols that implement a Web Service. The most famous of them are SOAP and REST. If we’re talking about C#, we’re talking about the design pattern ASP.NET Web Service for soap and ASP.NET Web API for rest.

I need to develop a web service, and so its main idea is communication client, server.

Not exactly. The main idea is to make two applications, no matter what platforms are developed, to talk. One can be a client of the other and vice versa.

But I do not understand how this would be done using the MVC architecture and using the C#language, will have the need for a local server with Apache?

The MVC architecture does not serve to build Web Services. The MVC architecture serves to build applications. The basic difference between them is the entity that interacts with each one. In the application, it will be a user (usually a human). In the service, it will be an application or other service.

Typically, the server used for web applications and services is the IIS - Internet Information Services, or Internet Information Services. After the launch of ASP.NET Core, there is also the option of other servers, such as the Kestrel.

Still, if you really want to run code. NET in Apache (which is little recommended, except for some specific need you have), you can use the library mod_mono.

-3

What you are looking for is how to create a REST Service, i.e., an API.

If you want to use C# to create your API, then follow these steps:

I believe it is a good path of stones to start and create your web service.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.