user3220129
user3220129

Reputation: 501

Running MVC application as a standalone app

We were able to create a node js web application (html, css, angular js and node js) and package within node-webkit to run it as a standalone application. This works like a charm !!!.

Similar to it, we want to package .net MVC web application as a standalone application and run it as a standalone app. This is required to easliy ship the application to any desired stakeholders.

Currently, not sure of the ways in achieving this requirement. Having said that, following are the questions - Is it possible to convert a .net web application to a standalone app? - If possible, what is the proposed method in achieving this requirement?

Upvotes: 4

Views: 2001

Answers (3)

user3220129
user3220129

Reputation: 501

I was able to achieve this requirement using UltiDev Cassini Web Server Pro. This provides a light weight environment with an integrated Cassini web server for hosting ASP.net applications. It supports MVC4 application also.

To achieve this, I followed below steps:

  • Installed ultidev cassini web server pro locally.
  • Published my MVC4 application code to an appropriate location.
  • Created a install shield limited edition setup for the application with UltiDev Web Server Pro as redistributable component. Output is a setup.exe that is packaged with a web server. Thereby, I didn't require IIS to be pre-installed in the target machine where the application needs to be setup.
  • Setup.exe installation in target machine performed following steps
    • Installed .net 4.0 (included as redistributable)
    • Installed UltiDev Cassini Web Server
    • Allowed user to select the destination folder for website placement.
    • On successful installation, UltiDev web server started automatically and launched the MVC application. This was done using an installer custom action with an appropriate command line to start server, register the application and launch the application at the instant of successful installation.
    • On successfully, registering the application the web server, there would be desktop shortcut created to launch the web application. Running this shortcut would successfully launch the web application only when the UltiDev web server is running.
    • To get the web server always up and running we could consider starting the service in service.msc as part of a installer custom action.

Following above listed steps I was able to install a web application in target machine and run it without using IIS. Hope this information helps !!! :)

Upvotes: 2

Kaido
Kaido

Reputation: 3951

If the stakeholders have IIS and asp.net installed you could send them a web deploy package. Otherwise I think you lack the asp.net prerequisites.

Upvotes: 0

Craig
Craig

Reputation: 23

As far as I know you cannot self-host (aka run standalone) an MVC app as it depends on IIS.

Upvotes: 0

Related Questions