Skip to content

Commit

Permalink
Initial structure and sample project.
Browse files Browse the repository at this point in the history
  • Loading branch information
ardalis committed Jul 2, 2015
1 parent 2d8067a commit 62d295c
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 5 deletions.
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
32 changes: 27 additions & 5 deletions aspnet/fundamentals/owin.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
.. include:: /../common/stub-topic.txt
OWIN
====

|stub-icon| OWIN
================
By `Steve Smith`_

.. include:: /../common/stub-notice.txt
ASP.NET 5 supports OWIN, the Open Web Interface for .NET, which allows web applications to be decoupled from web servers. In addition, OWIN defines a standard way for middleware to be used in a pipeline to handle individual requests and associated responses. ASP.NET 5 applications and middleware can interoperate with OWIN-based applications and middleware.

In this article:
- `Running OWIN middleware in the ASP.NET pipeline`_
- `Using ASP.NET Hosting on an OWIN-based server`_
- `Using ASP.NET middleware in an OWIN pipeline`_
- `OWIN keys and ASP.NET OWIN adapters`_

`Browse or download samples on GitHub <https://github.com/aspnet/Docs/tree/master/docs/fundamentals/owin/sample>`_.

Running OWIN middleware in the ASP.NET pipeline
-----------------------------------------------

Using ASP.NET Hosting on an OWIN-based server
---------------------------------------------

Using ASP.NET middleware in an OWIN pipeline
--------------------------------------------

OWIN keys and ASP.NET OWIN adapters
-----------------------------------

Summary
-------

.. _issue: https://github.com/aspnet/Docs/issues/71
32 changes: 32 additions & 0 deletions aspnet/fundamentals/owin/sample/OwinSample.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.22823.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A2F3CA98-7115-4786-89CD-2DE72ABA48B9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{AB54F120-651A-4C98-94ED-EB5DD19F241D}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
EndProjectSection
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "OwinSample", "src\OwinSample\OwinSample.xproj", "{5BCA088C-966B-445D-8F97-AEDEEB8E0EEF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5BCA088C-966B-445D-8F97-AEDEEB8E0EEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BCA088C-966B-445D-8F97-AEDEEB8E0EEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BCA088C-966B-445D-8F97-AEDEEB8E0EEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BCA088C-966B-445D-8F97-AEDEEB8E0EEF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{5BCA088C-966B-445D-8F97-AEDEEB8E0EEF} = {A2F3CA98-7115-4786-89CD-2DE72ABA48B9}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions aspnet/fundamentals/owin/sample/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-beta5-11911"
}
}
19 changes: 19 additions & 0 deletions aspnet/fundamentals/owin/sample/src/OwinSample/OwinSample.xproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>5bca088c-966b-445d-8f97-aedeeb8e0eef</ProjectGuid>
<RootNamespace>OwinSample</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
<DevelopmentServerPort>46558</DevelopmentServerPort>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
22 changes: 22 additions & 0 deletions aspnet/fundamentals/owin/sample/src/OwinSample/Startup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http;
using Microsoft.Framework.DependencyInjection;

namespace OwinSample
{
public class Startup
{
// For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
}

public void Configure(IApplicationBuilder app)
{
app.Run(async (context) =>
{
await context.Response.WriteAsync("Hello World!");
});
}
}
}
31 changes: 31 additions & 0 deletions aspnet/fundamentals/owin/sample/src/OwinSample/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"webroot": "wwwroot",
"version": "1.0.0-*",

"dependencies": {
"Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta4"
},

"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000"
},

"frameworks": {
"dnx451": { },
"dnxcore50": { }
},

"publishExclude": [
"node_modules",
"bower_components",
"**.xproj",
"**.user",
"**.vspscc"
],
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
]
}

0 comments on commit 62d295c

Please sign in to comment.