-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed the route parsing logic by caching the httpContext object (NetF…
…ramework) (#132)
- Loading branch information
1 parent
98430b8
commit 302c093
Showing
83 changed files
with
84,809 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.10.35122.118 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HttpServer", "HttpServer\HttpServer.csproj", "{E128145D-E344-4B06-B0E4-76F368A5AC7B}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{E128145D-E344-4B06-B0E4-76F368A5AC7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{E128145D-E344-4B06-B0E4-76F368A5AC7B}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{E128145D-E344-4B06-B0E4-76F368A5AC7B}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{E128145D-E344-4B06-B0E4-76F368A5AC7B}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {CF3302CB-B217-40A9-88D3-2D8A7F3EFF62} | ||
EndGlobalSection | ||
EndGlobal |
30 changes: 30 additions & 0 deletions
30
sample-applications/NetFrameworkSampleApp/HttpServer/App_Start/BundleConfig.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Web; | ||
using System.Web.Optimization; | ||
|
||
namespace HttpServer | ||
{ | ||
public class BundleConfig | ||
{ | ||
// For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862 | ||
public static void RegisterBundles(BundleCollection bundles) | ||
{ | ||
bundles.Add(new ScriptBundle("~/bundles/jquery").Include( | ||
"~/Scripts/jquery-{version}.js")); | ||
|
||
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( | ||
"~/Scripts/jquery.validate*")); | ||
|
||
// Use the development version of Modernizr to develop with and learn from. Then, when you're | ||
// ready for production, use the build tool at https://modernizr.com to pick only the tests you need. | ||
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( | ||
"~/Scripts/modernizr-*")); | ||
|
||
bundles.Add(new Bundle("~/bundles/bootstrap").Include( | ||
"~/Scripts/bootstrap.js")); | ||
|
||
bundles.Add(new StyleBundle("~/Content/css").Include( | ||
"~/Content/bootstrap.css", | ||
"~/Content/site.css")); | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
sample-applications/NetFrameworkSampleApp/HttpServer/App_Start/FilterConfig.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Web; | ||
using System.Web.Mvc; | ||
|
||
namespace HttpServer | ||
{ | ||
public class FilterConfig | ||
{ | ||
public static void RegisterGlobalFilters(GlobalFilterCollection filters) | ||
{ | ||
filters.Add(new HandleErrorAttribute()); | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
sample-applications/NetFrameworkSampleApp/HttpServer/App_Start/RouteConfig.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Web; | ||
using System.Web.Mvc; | ||
using System.Web.Routing; | ||
|
||
namespace HttpServer | ||
{ | ||
public class RouteConfig | ||
{ | ||
public static void RegisterRoutes(RouteCollection routes) | ||
{ | ||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); | ||
|
||
routes.MapRoute( | ||
name: "OutgoingHttpCall", | ||
url: "outgoing-http-call/test/{id}", | ||
defaults: new { controller = "HttpCall", action = "OutgoingHttpCall", id = UrlParameter.Optional } | ||
); | ||
|
||
routes.MapRoute( | ||
name: "Default", | ||
url: "{controller}/{action}/{id}", | ||
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } | ||
); | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
sample-applications/NetFrameworkSampleApp/HttpServer/Content/Site.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* Set padding to keep content from hitting the edges */ | ||
.body-content { | ||
margin-top: 15px; | ||
padding-left: 15px; | ||
padding-right: 15px; | ||
} | ||
|
||
/* Override the default bootstrap behavior where horizontal description lists | ||
will truncate terms that are too long to fit in the left column | ||
*/ | ||
.dl-horizontal dt { | ||
white-space: normal; | ||
} | ||
|
||
/* Set width on the form input elements since they're 100% wide by default */ | ||
input, | ||
select, | ||
textarea { | ||
max-width: 280px; | ||
} |
Oops, something went wrong.