Running Web Application Locally (Offline) & without IIS

14,080

You can definitely self host a .NET web application using OWIN. Unfortunately documentation and information about it is vague and confusing at best. The fact that you're using MVC makes it somewhat easier as you may be able to directly use the self-host packages from Nuget for self hosting Web API. There may be similar packages for MVC.

I don't have recent experience but a Nuget search for "MVC Self Host" should yield some results.

Below is a link with an example. But the term you are looking for is definitely "self host". It can be done via a console window or (more complex) a windows service. It will likely use some form of OWIN but you can probably find some 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/

Share:
14,080
Ron
Author by

Ron

“An ounce of prevention is worth a pound of cure.” B.F You can reach me here [email protected]

Updated on June 14, 2022

Comments

  • Ron
    Ron almost 2 years

    I'm trying to understand if there is a way to make a web application run on the local computer(browser) without IIS.

    My main objective is to transform my web application (that is on the internet) to a software that runs on the local computer without using the internet and without IIS.

    My idea is to distributed my webapp between my colleagues and not forcing them to work online and not needing an internet connection.

    I have a MVC web app with 3 pages and a couple of methods on the server side.

    The idea of the application is to get proprieties from a form that I implemented on one of the pages of my web application and transform the proprieties on the client side to JSON and send it to the server, the server will generate XML file according to the JSON object and let the client download the XML file that were generated.

    The flow of it:

    1.The Client fill the form in my site.

    2.The form become JSON object on the client side.

    3.The JSON object that stored the properties of the form(filled by the client) is send to the server.

    4.The server get the JSON object and generated XML document from it.

    5.The client download the generated XML file.

    Very simple web application.

    I know that I can run HTML page by clicking it and the page will display on the browser but I need the server side to be working too to carry out actions.

    So my question is : How can I make my web application run without internet ?

    With the constrains:

    1. No IIS required.
    2. Working with .NET 4.0. (OWIN 2.0 - Not good)
    3. No internet require.
    4. No installation required to the computer ill pass this web app.
    5. The server side code wont be expose when I send this application to my friends.

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

    If someone could provide me with a guide lines it will be very helpful.

    Thanks a lot.