Skip to content

Commit ddcb085

Browse files
authored
Merge pull request dotnet-architecture#73 from BillWagner/legacy-net-framework-apps
WIP: Running Legacy Net Frameworks in Windows Containers
2 parents 7db5119 + cc9f6f8 commit ddcb085

93 files changed

Lines changed: 29291 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26228.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Catalog.WebForms", "Catalog.WebForms\Catalog.WebForms.csproj", "{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}"
7+
EndProject
8+
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{7816BBB6-20B9-4D5A-864D-47B7C6E3D3D5}"
9+
ProjectSection(ProjectDependencies) = postProject
10+
{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB} = {07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}
11+
{9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD} = {9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD}
12+
EndProjectSection
13+
EndProject
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Catalog.API", "..\..\Services\Catalog\Catalog.API\Catalog.API.csproj", "{9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD}"
15+
EndProject
16+
Global
17+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
18+
Debug|Any CPU = Debug|Any CPU
19+
Release|Any CPU = Release|Any CPU
20+
EndGlobalSection
21+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
22+
{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23+
{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
24+
{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
25+
{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{7816BBB6-20B9-4D5A-864D-47B7C6E3D3D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{7816BBB6-20B9-4D5A-864D-47B7C6E3D3D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{7816BBB6-20B9-4D5A-864D-47B7C6E3D3D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{7816BBB6-20B9-4D5A-864D-47B7C6E3D3D5}.Release|Any CPU.Build.0 = Release|Any CPU
30+
{9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31+
{9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
32+
{9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
33+
{9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD}.Release|Any CPU.Build.0 = Release|Any CPU
34+
EndGlobalSection
35+
GlobalSection(SolutionProperties) = preSolution
36+
HideSolutionNode = FALSE
37+
EndGlobalSection
38+
EndGlobal
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!obj\Docker\publish\*
3+
!obj\Docker\empty\
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="Microsoft.eShopOnContainers.Catalog.WebForms.About" %>
2+
3+
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
4+
<h2><%: Title %>.</h2>
5+
<h3>Your application description page.</h3>
6+
<p>Use this area to provide additional information.</p>
7+
</asp:Content>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.UI;
6+
using System.Web.UI.WebControls;
7+
8+
namespace Microsoft.eShopOnContainers.Catalog.WebForms
9+
{
10+
public partial class About : Page
11+
{
12+
protected void Page_Load(object sender, EventArgs e)
13+
{
14+
15+
}
16+
}
17+
}

src/Web/Catalog.WebForms/Catalog.WebForms/About.aspx.designer.cs

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Optimization;
6+
using System.Web.UI;
7+
8+
namespace Microsoft.eShopOnContainers.Catalog.WebForms
9+
{
10+
public class BundleConfig
11+
{
12+
// For more information on Bundling, visit https://go.microsoft.com/fwlink/?LinkID=303951
13+
public static void RegisterBundles(BundleCollection bundles)
14+
{
15+
bundles.Add(new ScriptBundle("~/bundles/WebFormsJs").Include(
16+
"~/Scripts/WebForms/WebForms.js",
17+
"~/Scripts/WebForms/WebUIValidation.js",
18+
"~/Scripts/WebForms/MenuStandards.js",
19+
"~/Scripts/WebForms/Focus.js",
20+
"~/Scripts/WebForms/GridView.js",
21+
"~/Scripts/WebForms/DetailsView.js",
22+
"~/Scripts/WebForms/TreeView.js",
23+
"~/Scripts/WebForms/WebParts.js"));
24+
25+
// Order is very important for these files to work, they have explicit dependencies
26+
bundles.Add(new ScriptBundle("~/bundles/MsAjaxJs").Include(
27+
"~/Scripts/WebForms/MsAjax/MicrosoftAjax.js",
28+
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js",
29+
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js",
30+
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js"));
31+
32+
// Use the Development version of Modernizr to develop with and learn from. Then, when you’re
33+
// ready for production, use the build tool at https://modernizr.com to pick only the tests you need
34+
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
35+
"~/Scripts/modernizr-*"));
36+
37+
System.Web.UI.ScriptManager.ScriptResourceMapping.AddDefinition(
38+
"respond",
39+
new ScriptResourceDefinition
40+
{
41+
Path = "~/Scripts/respond.min.js",
42+
DebugPath = "~/Scripts/respond.js",
43+
});
44+
}
45+
}
46+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Web;
4+
using System.Web.Routing;
5+
using Microsoft.AspNet.FriendlyUrls;
6+
7+
namespace Microsoft.eShopOnContainers.Catalog.WebForms
8+
{
9+
public static class RouteConfig
10+
{
11+
public static void RegisterRoutes(RouteCollection routes)
12+
{
13+
var settings = new FriendlyUrlSettings();
14+
settings.AutoRedirectMode = RedirectMode.Permanent;
15+
routes.EnableFriendlyUrls(settings);
16+
}
17+
}
18+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings">
3+
<TelemetryInitializers>
4+
<Add Type="Microsoft.ApplicationInsights.DependencyCollector.HttpDependenciesParsingTelemetryInitializer, Microsoft.AI.DependencyCollector"/>
5+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.AzureRoleEnvironmentTelemetryInitializer, Microsoft.AI.WindowsServer"/>
6+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.AzureWebAppRoleEnvironmentTelemetryInitializer, Microsoft.AI.WindowsServer"/>
7+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.BuildInfoConfigComponentVersionTelemetryInitializer, Microsoft.AI.WindowsServer"/>
8+
<Add Type="Microsoft.ApplicationInsights.Web.WebTestTelemetryInitializer, Microsoft.AI.Web"/>
9+
<Add Type="Microsoft.ApplicationInsights.Web.SyntheticUserAgentTelemetryInitializer, Microsoft.AI.Web">
10+
<!-- Extended list of bots:
11+
search|spider|crawl|Bot|Monitor|BrowserMob|BingPreview|PagePeeker|WebThumb|URL2PNG|ZooShot|GomezA|Google SketchUp|Read Later|KTXN|KHTE|Keynote|Pingdom|AlwaysOn|zao|borg|oegp|silk|Xenu|zeal|NING|htdig|lycos|slurp|teoma|voila|yahoo|Sogou|CiBra|Nutch|Java|JNLP|Daumoa|Genieo|ichiro|larbin|pompos|Scrapy|snappy|speedy|vortex|favicon|indexer|Riddler|scooter|scraper|scrubby|WhatWeb|WinHTTP|voyager|archiver|Icarus6j|mogimogi|Netvibes|altavista|charlotte|findlinks|Retreiver|TLSProber|WordPress|wsr-agent|http client|Python-urllib|AppEngine-Google|semanticdiscovery|facebookexternalhit|web/snippet|Google-HTTP-Java-Client-->
12+
<Filters>search|spider|crawl|Bot|Monitor|AlwaysOn</Filters>
13+
</Add>
14+
<Add Type="Microsoft.ApplicationInsights.Web.ClientIpHeaderTelemetryInitializer, Microsoft.AI.Web"/>
15+
<Add Type="Microsoft.ApplicationInsights.Web.OperationNameTelemetryInitializer, Microsoft.AI.Web"/>
16+
<Add Type="Microsoft.ApplicationInsights.Web.OperationCorrelationTelemetryInitializer, Microsoft.AI.Web"/>
17+
<Add Type="Microsoft.ApplicationInsights.Web.UserTelemetryInitializer, Microsoft.AI.Web"/>
18+
<Add Type="Microsoft.ApplicationInsights.Web.AuthenticatedUserIdTelemetryInitializer, Microsoft.AI.Web"/>
19+
<Add Type="Microsoft.ApplicationInsights.Web.AccountIdTelemetryInitializer, Microsoft.AI.Web"/>
20+
<Add Type="Microsoft.ApplicationInsights.Web.SessionTelemetryInitializer, Microsoft.AI.Web"/>
21+
</TelemetryInitializers>
22+
<TelemetryModules>
23+
<Add Type="Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule, Microsoft.AI.DependencyCollector"/>
24+
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule, Microsoft.AI.PerfCounterCollector">
25+
<!--
26+
Use the following syntax here to collect additional performance counters:
27+
28+
<Counters>
29+
<Add PerformanceCounter="\Process(??APP_WIN32_PROC??)\Handle Count" ReportAs="Process handle count" />
30+
...
31+
</Counters>
32+
33+
PerformanceCounter must be either \CategoryName(InstanceName)\CounterName or \CategoryName\CounterName
34+
35+
NOTE: performance counters configuration will be lost upon NuGet upgrade.
36+
37+
The following placeholders are supported as InstanceName:
38+
??APP_WIN32_PROC?? - instance name of the application process for Win32 counters.
39+
??APP_W3SVC_PROC?? - instance name of the application IIS worker process for IIS/ASP.NET counters.
40+
??APP_CLR_PROC?? - instance name of the application CLR process for .NET counters.
41+
-->
42+
</Add>
43+
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule, Microsoft.AI.PerfCounterCollector"/>
44+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.DeveloperModeWithDebuggerAttachedTelemetryModule, Microsoft.AI.WindowsServer"/>
45+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.UnhandledExceptionTelemetryModule, Microsoft.AI.WindowsServer"/>
46+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.UnobservedExceptionTelemetryModule, Microsoft.AI.WindowsServer"/>
47+
<Add Type="Microsoft.ApplicationInsights.Web.RequestTrackingTelemetryModule, Microsoft.AI.Web">
48+
<Handlers>
49+
<!--
50+
Add entries here to filter out additional handlers:
51+
52+
NOTE: handler configuration will be lost upon NuGet upgrade.
53+
-->
54+
<Add>System.Web.Handlers.TransferRequestHandler</Add>
55+
<Add>Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler</Add>
56+
<Add>System.Web.StaticFileHandler</Add>
57+
<Add>System.Web.Handlers.AssemblyResourceLoader</Add>
58+
<Add>System.Web.Optimization.BundleHandler</Add>
59+
<Add>System.Web.Script.Services.ScriptHandlerFactory</Add>
60+
<Add>System.Web.Handlers.TraceHandler</Add>
61+
<Add>System.Web.Services.Discovery.DiscoveryRequestHandler</Add>
62+
<Add>System.Web.HttpDebugHandler</Add>
63+
</Handlers>
64+
</Add>
65+
<Add Type="Microsoft.ApplicationInsights.Web.ExceptionTrackingTelemetryModule, Microsoft.AI.Web"/>
66+
</TelemetryModules>
67+
<TelemetryProcessors>
68+
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor, Microsoft.AI.PerfCounterCollector"/>
69+
<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
70+
<MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
71+
</Add>
72+
</TelemetryProcessors>
73+
<TelemetryChannel Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel, Microsoft.AI.ServerTelemetryChannel"/>
74+
<!--
75+
Learn more about Application Insights configuration with ApplicationInsights.config here:
76+
http://go.microsoft.com/fwlink/?LinkID=513840
77+
78+
Note: If not present, please add <InstrumentationKey>Your Key</InstrumentationKey> to the top of this file.
79+
--></ApplicationInsights>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<bundles version="1.0">
3+
<styleBundle path="~/Content/css">
4+
<include path="~/Content/bootstrap.css" />
5+
<include path="~/Content/Site.css" />
6+
</styleBundle>
7+
</bundles>

0 commit comments

Comments
 (0)