diff --git a/OwinWebApiTest.sln b/OwinWebApiTest.sln new file mode 100644 index 0000000..b79653d --- /dev/null +++ b/OwinWebApiTest.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OwinWebApiTest", "OwinWebApiTest\OwinWebApiTest.csproj", "{9486D46C-2C98-41D6-96F1-0546E2AB8D99}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9486D46C-2C98-41D6-96F1-0546E2AB8D99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9486D46C-2C98-41D6-96F1-0546E2AB8D99}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9486D46C-2C98-41D6-96F1-0546E2AB8D99}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9486D46C-2C98-41D6-96F1-0546E2AB8D99}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/OwinWebApiTest/App_Start/WebApiConfig.cs b/OwinWebApiTest/App_Start/WebApiConfig.cs new file mode 100644 index 0000000..65200ab --- /dev/null +++ b/OwinWebApiTest/App_Start/WebApiConfig.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.Http; + +namespace OwinWebApiTest +{ + public static class WebApiConfig + { + public static void Register(HttpConfiguration config) + { + // Web API configuration and services + + // Web API routes + config.MapHttpAttributeRoutes(); + + config.Routes.MapHttpRoute( + name: "DefaultApi", + routeTemplate: "api/{controller}/{id}", + defaults: new { id = RouteParameter.Optional } + ); + } + } +} diff --git a/OwinWebApiTest/Global.asax b/OwinWebApiTest/Global.asax new file mode 100644 index 0000000..3a35a99 --- /dev/null +++ b/OwinWebApiTest/Global.asax @@ -0,0 +1 @@ +<%@ Application Codebehind="Global.asax.cs" Inherits="OwinWebApiTest.WebApiApplication" Language="C#" %> diff --git a/OwinWebApiTest/Global.asax.cs b/OwinWebApiTest/Global.asax.cs new file mode 100644 index 0000000..e1e8b43 --- /dev/null +++ b/OwinWebApiTest/Global.asax.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Http; +using System.Web.Routing; + +namespace OwinWebApiTest +{ + public class WebApiApplication : System.Web.HttpApplication + { + protected void Application_Start() + { + GlobalConfiguration.Configure(WebApiConfig.Register); + } + } +} diff --git a/OwinWebApiTest/OwinWebApiTest.csproj b/OwinWebApiTest/OwinWebApiTest.csproj new file mode 100644 index 0000000..9232bc5 --- /dev/null +++ b/OwinWebApiTest/OwinWebApiTest.csproj @@ -0,0 +1,147 @@ + + + + + + + Debug + AnyCPU + + + 2.0 + {9486D46C-2C98-41D6-96F1-0546E2AB8D99} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + OwinWebApiTest + OwinWebApiTest + v4.5.2 + true + + + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll + True + + + + + + + + + + + + + + + + + + + + + + + ..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll + + + ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll + + + ..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll + + + ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll + + + + + + + + + + Global.asax + + + + + + + Web.config + + + Web.config + + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + True + True + 61713 + / + http://localhost:61713/ + False + False + + + False + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + \ No newline at end of file diff --git a/OwinWebApiTest/Properties/AssemblyInfo.cs b/OwinWebApiTest/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..944a431 --- /dev/null +++ b/OwinWebApiTest/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OwinWebApiTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OwinWebApiTest")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("9486d46c-2c98-41d6-96f1-0546e2ab8d99")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OwinWebApiTest/Web.Debug.config b/OwinWebApiTest/Web.Debug.config new file mode 100644 index 0000000..2e302f9 --- /dev/null +++ b/OwinWebApiTest/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/OwinWebApiTest/Web.Release.config b/OwinWebApiTest/Web.Release.config new file mode 100644 index 0000000..c358444 --- /dev/null +++ b/OwinWebApiTest/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/OwinWebApiTest/Web.config b/OwinWebApiTest/Web.config new file mode 100644 index 0000000..eb12ae6 --- /dev/null +++ b/OwinWebApiTest/Web.config @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OwinWebApiTest/packages.config b/OwinWebApiTest/packages.config new file mode 100644 index 0000000..4dc8b2f --- /dev/null +++ b/OwinWebApiTest/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file