Self Hosting and Standalone Web Apps

Self Hosting

Run any Wisej Real Time Web Application without IIS. The new Wisej.HostService extension runs an OWIN/Katana web server as a process or as a service and can host any Wisej, ASP.NET, WebForms application.

Deploy Wisej applications as a “package” or “appliance”, or to work together with NGINX or Apache acting as reverse proxies or load balancers.

We provide the full source code to let you build your own personalized service by adding any OWIN middleware you may need for authentication, logging, directory browsing, etc.

The project includes all the necessary assemblies and it’s setup to merge everything into a single executable of only 388K! It doesn’t require to be installed, you can run it from the command line, startup, event scheduler or as a service.

These are the command line arguments:

Argument Description
(none) or -start Starts the host process for the current Wisej application: where the process is located.
-stop Stops the process for the current Wisej application.
-p:{port} or -port:{port} Changes the port. The default is 8080.
-d:{domain name} or -domain:{domain name}

 

Limits the domain: i.e. * = all, or localhost to accept local connections only. The default is *.

-i or -install

Installs Wisej.HostService as a Windows service for the current Wisej application.

 

You can mix “-i” with “-p:” and “-n:” and “-d:”.

-u or -uninstall Uninstalls Wisej.HostService from the Windows services.
-n:{name} or -name:{} Changes the name of the service, otherwise Wisej sets the name to “Wisej.HostService: “ + {Name of Wisej Application Folder}

 

By default, the server listens to any domain “*” so it may need to be run with administrator privileges.

You can limit the domain to localhost using “Wisej.HostService -d:localhost”.

Usage Examples

  • Register a Windows service that listens to port 8181 for all domains: Wisej.HostService -i -p:8181
  • Starts the server immediately as a process listening on port 8080 (the default) only locally: Wisej.HostService -d:localhost

 

Standalone Application

Run any Wisej application as a Desktop App on Windows. You can fully customize the window frame and mix .NET code managing the frame with the Wisej web application. You don’t need a web server and don’t need an internet connection.

There are two projects: Wisej.Application.IE and Wisej.Application.Chrome. The first generates a single executable of about 500Kb that contains everything needed without installation. The second (Chrome) also generates a single executable, but the size is about 110MB since it contains the latest Chromium browser (in this case the client desktop doesn’t need IE installed).

We provide the full source code for both projects to let you fully customize the built-in hosting and the UI.

You can add a toolbar or any other control that can interact with the embedded browser and the Wisej application used by the browser.

 

 

These are the command line arguments:

Argument Description
-p:{port} or -port:{port} Changes the port. By default, it listens to the first available port. Use this argument if you want the standalone application to serve external users.
-d:{domain name} or -domain:{domain name} Changes the domain that the server listens to. By default, the standalone process only accepts connections from localhost. Use this argument together with -port to server external users.
-fullscreen or -fullscreen:topmost

 

Starts the standalone application in full screen mode and optionally makes it the topmost window.

 

To enable F11 and Escape to enter or leave full screen mode using the keyboard, set the MainView.AllowFullScreenMode property to true when compiling Wisej.Application.

 

 

How to Use It

Simply copy Wisej.HostService.exe or Wisej.Application.exe (IE or Chrome) to the root Wisej project directory, at the same level as web.config. That’s it. 

If you register Wisej.HostService.exe as a service, it will register using the name of the Wisej directory. You can register as many services as you like (one for each hosted Wisej app, as long as they listen to different ports). The hosted application may server unlimited sub-applications.

Read the included docs to see how to customize add additional languages to the Chrome application.

Zip File (57M)

Leave a Reply