This project has moved and is read-only. For the latest updates, please go here.

How do I run my Katana based app or framework?

These instructions will help you set up an Katana based project and then author and deploy an Katana based app. For additional samples see http://aspnet.codeplex.com/.

In VS 2012:
From the menu, click: File -> New -> Project...
In the new project dialog, select: Installed -> Templates -> Visual C# -> Web
Choose: ASP.NET Empty Web Application

Install the OWIN System.Web adapter:
Right-click on the project and select Manage Nuget Packages
Select Online, and Include Prerelease
Search for Microsoft.Owin.Host.SystemWeb" and press Install*
Also search for Microsoft.Owin.Diagnostics and install it.

Create a Startup class:
Right-click on the project and select Add -> Class...
Select Installed -> Visual C# -> Code -> Class and name it Startup.cs

Add using Owin; at the top of the file. Then add the following method in the Startup class:
public void Configuration(IAppBuilder app)
{
    app.UseWelcomePage();
}


You can now "F5" to run and should see a simple welcome page running on System.Web (ASP.NET).

How do I run my Katana based app on HttpListener?

These instructions will help you install and run an OWIN HttpListener server using Chocolatey and Katana.

Start with the same application you wrote above.

To install Chocolatey (http://chocolatey.org/) run the following from the command line:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://bit.ly/psChocInstall'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

To install OwinHost.exe, run:
cinst OwinHost -pre

Run the self-host app:
Open an CMD prompt
CD into the base directory of your web app
And run:
OwinHost

Browse to the default url: http://localhost:5000/

Last edited May 30, 2014 at 5:28 PM by Tratcher, version 5

Comments

OzBobWA Dec 14, 2015 at 4:14 AM 
Updated Choclatey install (from https://chocolatey.org/) run from Admin Cmd prompt:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://bit.ly/psChocInstall'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

vmikeska Nov 12, 2014 at 2:13 PM 
lol, good point... I am now running meaningless HelloWorld

halivudestevez Sep 23, 2014 at 8:58 PM 
OK, but what is it good for?