Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

Owin Sample with F#

It can be hosted in either IIS or as a Self-Host app. You can use this project as a template or reference for creating server-side portion of a single-page application (SPA).

F# Owin Sample Project

References

Download

Web Application Server

http://visualstudiogallery.msdn.microsoft.com/c7ea6e81-b383-40e4-899c-4a5ab9d68f02

OWIN Startup (startup.fs)

namespace Server

open Owin
open Microsoft.Owin

type Startup() =
    member x.Configuration(app: Owin.IAppBuilder) =
        app.Run(fun ctx ->
            ctx.Response.ContentType <- "text/plain"
            ctx.Response.WriteAsync("Owin Sample with F#")
        ) |> ignore

[<assembly: OwinStartup(typeof<Startup>)>]
do ()

You can plug SignalR and/or Nancy framework into this class and start from there. And the front-end part of the SPA can be developed in a separate project and hosted in CDN (ex.: angular-seed).

Also see: Owin Startup Class Detection

Project settings for local debugging

OwinHost

  <PropertyGroup>
    ...
    <StartProgram>$(SolutionDir)packages\OwinHost.3.0.0-beta1\tools\OwinHost.exe</StartProgram>
    <StartArguments>-d "$(ProjectDir)"</StartArguments>
  </PropertyGroup>

Project settings for web publishing

  <PropertyGroup>
    ...
    <ProjectGuid>...</ProjectGuid>
    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{f2a71f9b-5d33-465a-a702-920d77279786}</ProjectTypeGuids>
    ...
  </PropertyGroup>
  ...
  <PropertyGroup>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
  </PropertyGroup>
  <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />

About

Web application server sample project with Owin / Katana and F#

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.