diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Catalog.WebForms.csproj b/src/Web/Catalog.WebForms/Catalog.WebForms/Catalog.WebForms.csproj deleted file mode 100644 index aa829a4c8..000000000 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/Catalog.WebForms.csproj +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - - Debug - AnyCPU - - - 2.0 - {07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - Microsoft.eShopOnContainers.Catalog.WebForms - Catalog.WebForms - v4.5.2 - true - - - - - - - - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - true - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - ..\packages\Autofac.4.3.0\lib\net45\Autofac.dll - - - ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll - - - - - - - - - - - - - - - - - - - - True - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\packages\AspNet.ScriptManager.bootstrap.3.0.0\lib\net45\AspNet.ScriptManager.bootstrap.dll - - - ..\packages\AspNet.ScriptManager.jQuery.1.10.2\lib\net45\AspNet.ScriptManager.jQuery.dll - - - ..\packages\Microsoft.AspNet.ScriptManager.MSAjax.5.0.0\lib\net45\Microsoft.ScriptManager.MSAjax.dll - - - ..\packages\Microsoft.AspNet.ScriptManager.WebForms.5.0.0\lib\net45\Microsoft.ScriptManager.WebForms.dll - - - ..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll - - - True - ..\packages\WebGrease.1.5.2\lib\WebGrease.dll - - - True - ..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll - - - True - ..\packages\Microsoft.AspNet.Web.Optimization.WebForms.1.1.3\lib\net45\Microsoft.AspNet.Web.Optimization.WebForms.dll - - - ..\packages\Microsoft.AspNet.FriendlyUrls.Core.1.0.2\lib\net45\Microsoft.AspNet.FriendlyUrls.dll - - - - - ..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll - - - ..\packages\Microsoft.ApplicationInsights.2.2.0\lib\net45\Microsoft.ApplicationInsights.dll - - - ..\packages\Microsoft.ApplicationInsights.Agent.Intercept.2.0.6\lib\net45\Microsoft.AI.Agent.Intercept.dll - - - ..\packages\Microsoft.ApplicationInsights.DependencyCollector.2.2.0\lib\net45\Microsoft.AI.DependencyCollector.dll - - - ..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0\lib\net45\Microsoft.AI.PerfCounterCollector.dll - - - ..\packages\Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0\lib\net45\Microsoft.AI.ServerTelemetryChannel.dll - - - ..\packages\Microsoft.ApplicationInsights.WindowsServer.2.2.0\lib\net45\Microsoft.AI.WindowsServer.dll - - - ..\packages\Microsoft.ApplicationInsights.Web.2.2.0\lib\net45\Microsoft.AI.Web.dll - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - About.aspx - ASPXCodeBehind - - - About.aspx - - - - Contact.aspx - ASPXCodeBehind - - - Contact.aspx - - - Default.aspx - ASPXCodeBehind - - - Default.aspx - - - - Global.asax - - - - - - - - - - - - - - Site.Master - ASPXCodeBehind - - - Site.Master - - - Site.Mobile.Master - ASPXCodeBehind - - - Site.Mobile.Master - - - ViewSwitcher.ascx - ASPXCodeBehind - - - ViewSwitcher.ascx - - - - - - - - - - Web.config - - - Web.config - - - - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - - - - - True - True - 58178 - / - http://localhost:58178/ - 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/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx.cs b/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx.cs deleted file mode 100644 index 29aa6f831..000000000 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/Default.aspx.cs +++ /dev/null @@ -1,45 +0,0 @@ -using Autofac; -using Autofac.Core; -using eShopOnContainers.Core.Models.Catalog; -using eShopOnContainers.Core.Services.Catalog; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace Microsoft.eShopOnContainers.Catalog.WebForms -{ - public partial class _Default : Page - { - private ICatalogService catalog; - - protected _Default() { } - - public _Default(ICatalogService catalog) - { - this.catalog = catalog; - } - - protected override void OnLoad(EventArgs e) - { - RegisterAsyncTask(new PageAsyncTask(LoadCatalogDataAsync)); - - base.OnLoad(e); - } - - private async Task LoadCatalogDataAsync() - { - var collection = await catalog?.GetCatalogAsync(); - catalogList.DataSource = collection; - catalogList.DataBind(); - } - - protected void Page_Load(object sender, EventArgs e) - { - - } - } -} \ No newline at end of file diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Global.asax.cs b/src/Web/Catalog.WebForms/Catalog.WebForms/Global.asax.cs deleted file mode 100644 index f0e204417..000000000 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/Global.asax.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Web; -using System.Web.Optimization; -using System.Web.Routing; - -namespace Microsoft.eShopOnContainers.Catalog.WebForms -{ - public class Global : HttpApplication - { - - void Application_Start(object sender, EventArgs e) - { - // Code that runs on application startup - RouteConfig.RegisterRoutes(RouteTable.Routes); - BundleConfig.RegisterBundles(BundleTable.Bundles); - - } - } -} \ No newline at end of file diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Modules/AutoFacHttpModule.cs b/src/Web/Catalog.WebForms/Catalog.WebForms/Modules/AutoFacHttpModule.cs deleted file mode 100644 index dae6493dc..000000000 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/Modules/AutoFacHttpModule.cs +++ /dev/null @@ -1,83 +0,0 @@ -using Autofac; -using eShopOnContainers.Core.Services.Catalog; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.Configuration; -using System.Web.UI; - -namespace Microsoft.eShopOnContainers.Catalog.WebForms.Modules -{ - // Using DI with WebForms is not yet implemented. - // This implementation has been adapted from this post: - // https://blogs.msdn.microsoft.com/webdev/2016/10/19/modern-asp-net-web-forms-development-dependency-injection/ - - public class AutoFacHttpModule : IHttpModule - { - private static IContainer Container => lazyContainer.Value; - - private static Lazy lazyContainer = new Lazy(() => CreateContainer()); - - private static IContainer CreateContainer() - { - // Configure AutoFac: - // Register Containers: - var settings = WebConfigurationManager.AppSettings; - var useFake = settings["usefake"]; - bool fake = useFake == "true"; - var builder = new ContainerBuilder(); - if (fake) - { - builder.RegisterType() - .As(); - } - else - { - builder.RegisterType() - .As(); - } - var container = builder.Build(); - return container; - } - - public void Dispose() - { - Container.Dispose(); - } - - public void Init(HttpApplication context) - { - context.PreRequestHandlerExecute += (_, __) => InjectDependencies(); - } - - private void InjectDependencies() - { - if (HttpContext.Current.CurrentHandler is Page page) - { - // Get the code-behind class that we may have written - var pageType = page.GetType().BaseType; - - // Determine if there is a constructor to inject, and grab it - var ctor = (from c in pageType.GetConstructors() - where c.GetParameters().Length > 0 - select c).FirstOrDefault(); - - if (ctor != null) - { - // Resolve the parameters for the constructor - var args = (from parm in ctor.GetParameters() - select Container.Resolve(parm.ParameterType)) - .ToArray(); - - // Execute the constructor method with the arguments resolved - ctor.Invoke(page, args); - } - - // Use the Autofac method to inject any properties that can be filled by Autofac - Container.InjectProperties(page); - - } - } - } -} \ No newline at end of file diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/Web.config b/src/Web/Catalog.WebForms/Catalog.WebForms/Web.config deleted file mode 100644 index 0c98f5b70..000000000 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/Web.config +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Web/Catalog.WebForms/Catalog.WebForms/packages.config b/src/Web/Catalog.WebForms/Catalog.WebForms/packages.config deleted file mode 100644 index 756f567ce..000000000 --- a/src/Web/Catalog.WebForms/Catalog.WebForms/packages.config +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file