Unravel.Startup
v0.1.11-alphaPre-release
.NETFramework4.7.2
Mimic ASP.NET Core Startup.cs to Unravel your dependence on System.Web.
Published
Jul 9, 2023
3y ago
Total Downloads
7.2K
7,179
Install
dotnet add package Unravel.Startup --version 0.1.11-alpha
| Product | Versions |
|---|---|
| Other |
README
Unravel.Startup
Unravel provides a fully configurable ASP.NET Core IWebHost on top of System.Web via OWIN, with forward-compatible dependency injection, configuration and logging.
Unravel.Application- Inherits from
System.Web.HttpApplication - Provides OWIN Startup
- Provides ASP.NET Core Startup, including
ConfigureServices(IServiceCollection) - Builds an ASP.NET Core
IWebHost, including anIServiceProvider- Static
Unravel.Application.Servicesservice locator - Scoped per
HttpContext - With
GetRequestServices()extension methods
- Static
- Inherits from
OwinHost.CreateDefaultBuilder(), equivalent toWebHost.CreateDefaultBuilder().Microsoft.Extensions.ConfigurationConfigurationManagerConfigurationProviderinspired by @benfosterappsettings.jsonandappsettings.{env}.json- User Secrets (Development only)
- Environment Variables
Microsoft.Extensions.DependencyInjectionMicrosoft.Extensions.Logging- Configured from
IConfiguration - Debug Logger
- Configured from
Setup
Install
Unravel.StartupOpen
Global.asax.cs:- Rename the class to
Startup - Make the class
partial - Inherit from
Unravel.Application
-public class MvcApplication : System.Web.HttpApplication +public partial class Startup : Unravel.ApplicationMake sure the
InheritsinGlobal.asaxupdated, too-<%@ Application CodeBehind="Global.asax.cs" Inherits="UnravelExamples.Web.MvcApplication" Language="C#" %> +<%@ Application CodeBehind="Global.asax.cs" Inherits="UnravelExamples.Web.Startup" Language="C#" %>- Rename the class to
If you already have a
Startup.cs:- Make it
partial - Replace
void Configuration(IAppBuilder app)withoverride void ConfigureOwin(IAppBuilder app)
If you don't, create one.
Then you can
override ConfigureServices(), too.// Startup.cs public partial class Startup { public override void ConfigureServices(IServiceCollection services) { } public override void ConfigureOwin(IAppBuilder app) { } }- Make it
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
This version is marked prerelease. Validate its API and upgrade path before production use.No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.