Running a web application locally (autonomously) and without IIS

I am trying to figure out if there is a way to make a web application on a local computer (browser) without IIS.

My main goal is to convert my web application (located on the Internet) into software that runs on a local computer without using the Internet and without IIS.

My idea is to distribute my webapp between my colleagues, rather than getting them to work on the Internet and not need an Internet connection.

I have a 3 page MVC web application and some server side methods.

The idea of ​​the application is to get decency from the form that I implemented on one of the pages of my web application and convert decency on the client side to JSON and send it to the server, the server will generate an XML file according to the JSON object and allow to the client to load the created XML file.

Flow:

1. A client will fill out a form on my website.

2. The form becomes a JSON object on the client side.

3. The JSON object that stores the form properties (populated by the client) is sent to the server.

4. The server receives the JSON object and generates an XML document.

5. The client downloads the generated XML file.

A very simple web application.

I know that I can launch an HTML page by clicking on it and the page will appear in the browser, but I need the server part to work also for the execution of actions.

So my question is : how can I make my web application work without the Internet?

With restrictions:

  • No IIS required.
  • Work with .NET 4.0. (OWIN 2.0 - not good)
  • Internet does not require.
  • No installation required for the computer skips this web application.
  • Server-side code will not be displayed when I send this application to my friends.

I read a couple of articles about OWIN, SingalR, Cassini and WCF, but it's all very vague ...

If someone can provide me with help lines, this will be very helpful.

Thank you very much.

+6
source share
1 answer

You can organize your own .NET web application using OWIN. Unfortunately, the documentation and information about this is at best vague and confused. The fact that you use MVC makes it a little easier, since you can directly use the self-service packages from Nuget for a standalone web API. There may be similar packages for MVC.

I have no recent experience, but a Nuget search for "Host Host MVC" should yield some results.

Below is a link to an example. But the term you are looking for is definitely "master of the host." This can be done through a console window or a (more complex) Windows service. It probably uses some form of OWIN, but you can probably find the startup code to copy and paste into your project, usually in the form of a Startup.cs file.

http://www.c-sharpcorner.com/UploadFile/4b0136/working-with-owin-hosting-and-self-hosting-in-Asp-Net/

+4
source

Source: https://habr.com/ru/post/976937/


All Articles