3

Let's consider the following example:

I have a solution made with C# on Visual Studio, it has a multi-tier architecture, the different layers are the following:

  • Data Model (Library)

  • Data Access (Library)

  • Business Logic (Library)

    ---------- services --------

  • Rest Service (ASP.NET Web API)

  • WCF Service (WCF Service Library)

    They can access the Business Logic and have been published on IIS


  • Proxy (Library): it uses the services mentioned above and connects to the IIS

  • Web Application (ASP .NET MVC 5). It uses the Proxy to access the Business Logic

All of them are on the same machine.

Referring to the scenario and components mentioned above, can you explain to me the difference between the web server (IIS) and the server?

More specifically, I refer to IIS as the webserver. Which is considered to be the server, is it different?

When I browse the pages (Razor Views) of the web application from Visual Studio, a segment of the URL is "Localhost": is it correct to say that it refers to the server and it means that every project and folder I need is in the current machine?

And when I browse the Rest and WCF services from IIS instead, does the "localhost" in the URL refers to the IIS Web Server or does it refer to the Server?

franz1
  • 823
  • 1
  • 6
  • 16

3 Answers3

9

"Server" is a generic term that represents a computer that shares something.

There are many different types of servers. Some share databases, others share web sites, still others share files and pictures.

IIS is an application, like WordPress, that runs on the server. In that regard, the terms IIS and server are synonymous. Technically, it is a service that runs on top your MS operating system. As a service, it listens for requests across specific protocols like HTTP/S and FTP, processes those requests and then shares them back to the user if appropriate.

Other servers like database or file servers, listen on entirely different ports and protocols for requests.

All of the items you listed are simply applications that extend the underlying functionality of the MS operating system.

It might help if you did some research on the OSI model for a better understanding of networking and computer architecture. You could start with https://rtnetworks.com/OSI.htm for a basic understanding of how network protocols, and ports work. It's a very old whitepaper, but explains networking in simple to understand terms.

is it correct to say that it refers to the server and it means that every project and folder I need is in the current machine?

That might be an overstatement.

Localhost is a pseudonym for the computer you are physically sitting at (or connecting to through a shell program). It represents an internal IP address of 127.0.0.1. Every computer using TCP/IP protocol, has this address built into it, and usually the pseudonym localhost. But back to your question, generally speaking anything you access using localhost in your path, will be to the computer you are sitting at.

Trebor
  • 3,300
  • 10
  • 25
4

The word "server" has become a bit ambiguous but general means a computer which provides information to other computers.

A web server used to be a physical machine that provided web pages to other other machines (clients). It also came to mean the software that served web pages- although this is really a misuse - a (software) webserver is technically speaking a web service - a service being software running on a server to answer requests to clients.

Referring to localhost as a server is correct - it refers to a machine/server (this machine)

A URL stands for uniform resource locator, and provides the details to get information. It includes thebserver, service and unique identifier, for example in the form

service://server/unique_identifier

davidgo
  • 8,560
  • 1
  • 21
  • 30
1

A web server accepts and fulfills requests from clients for static content (i.e., HTML pages, files, images, and videos) from a website. Web servers handle HTTP requests and responses only.

An application server exposes business logic to the clients, which generates dynamic content. It is a software framework that transforms data to provide the specialized functionality offered by a business, service, or application. Application servers enhance the interactive parts of a website that can appear differently depending on the context of the request.

Web Server VS Application Server

Web Server Deliver static content. Content is delivered using the HTTP protocol only. Serves only web-based applications. No support for multi-threading. Facilitates web traffic that is not very resource intensive.

Application Server Delivers dynamic content. Provides business logic to application programs using several protocols (including HTTP). Can serve web and enterprise-based applications. Uses multi-threading to support multiple requests in parallel. Facilitates longer running processes that are very resource-intensive​.