Skip to content

Commit 302c093

Browse files
authored
Fixed the route parsing logic by caching the httpContext object (NetFramework) (#132)
1 parent 98430b8 commit 302c093

File tree

83 files changed

+84809
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+84809
-7
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.10.35122.118
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HttpServer", "HttpServer\HttpServer.csproj", "{E128145D-E344-4B06-B0E4-76F368A5AC7B}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{E128145D-E344-4B06-B0E4-76F368A5AC7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{E128145D-E344-4B06-B0E4-76F368A5AC7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{E128145D-E344-4B06-B0E4-76F368A5AC7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{E128145D-E344-4B06-B0E4-76F368A5AC7B}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {CF3302CB-B217-40A9-88D3-2D8A7F3EFF62}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System.Web;
2+
using System.Web.Optimization;
3+
4+
namespace HttpServer
5+
{
6+
public class BundleConfig
7+
{
8+
// For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
9+
public static void RegisterBundles(BundleCollection bundles)
10+
{
11+
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
12+
"~/Scripts/jquery-{version}.js"));
13+
14+
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
15+
"~/Scripts/jquery.validate*"));
16+
17+
// Use the development version of Modernizr to develop with and learn from. Then, when you're
18+
// ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
19+
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
20+
"~/Scripts/modernizr-*"));
21+
22+
bundles.Add(new Bundle("~/bundles/bootstrap").Include(
23+
"~/Scripts/bootstrap.js"));
24+
25+
bundles.Add(new StyleBundle("~/Content/css").Include(
26+
"~/Content/bootstrap.css",
27+
"~/Content/site.css"));
28+
}
29+
}
30+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Web;
2+
using System.Web.Mvc;
3+
4+
namespace HttpServer
5+
{
6+
public class FilterConfig
7+
{
8+
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
9+
{
10+
filters.Add(new HandleErrorAttribute());
11+
}
12+
}
13+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Mvc;
6+
using System.Web.Routing;
7+
8+
namespace HttpServer
9+
{
10+
public class RouteConfig
11+
{
12+
public static void RegisterRoutes(RouteCollection routes)
13+
{
14+
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
15+
16+
routes.MapRoute(
17+
name: "OutgoingHttpCall",
18+
url: "outgoing-http-call/test/{id}",
19+
defaults: new { controller = "HttpCall", action = "OutgoingHttpCall", id = UrlParameter.Optional }
20+
);
21+
22+
routes.MapRoute(
23+
name: "Default",
24+
url: "{controller}/{action}/{id}",
25+
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
26+
);
27+
}
28+
}
29+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* Set padding to keep content from hitting the edges */
2+
.body-content {
3+
margin-top: 15px;
4+
padding-left: 15px;
5+
padding-right: 15px;
6+
}
7+
8+
/* Override the default bootstrap behavior where horizontal description lists
9+
will truncate terms that are too long to fit in the left column
10+
*/
11+
.dl-horizontal dt {
12+
white-space: normal;
13+
}
14+
15+
/* Set width on the form input elements since they're 100% wide by default */
16+
input,
17+
select,
18+
textarea {
19+
max-width: 280px;
20+
}

0 commit comments

Comments
 (0)