Configuring and Running Taurus.MVC in ASP.NET and ASP.NET Core Environments

Taurus.MVC supports both legacy .NET Framework and modern .NET Core/.NET 5+ runtimes. Developers can integrate the framework either by compiling the source code directly into the solution or by installing pre-compiled assemblies via NuGet. Both approaches require specific runtime configuartions to activate the routing and request processing pipeline.

Integration via Source Code

Cloning the official repository allows direct debugging and modification of the framework internals. The solution structure separates legacy and modern runtime implementations.

.NET Framework Configuration

For projects targeting .NET Framework 2.0 and above, navigate to the /demo/default/ directory and open the corresponding .sln file using Visual Studio 2012 or newer. The framework hooks into the ASP.NET pipeline through an HTTP module. Registration depends on the IIS application pool mode.

Update web.config to register the URL rewrite module:

<configuration>
  <system.web>
    <httpModules>
      <!-- Enable for Classic Mode -->
      <add name="TaurusRoutingModule" type="Taurus.Core.UrlRewrite, Taurus.Core" />
    </httpModules>
  </system.web>
</configuration>

.NET Core Configuration

For .NET Core 2.1 and later, open the _NetCore variant of the solution. The framework integrates via the standard dependency injection and middleware pipeline. Modify the startup class to register services and activate the middleware:

public void SetupServices(IServiceCollection serviceCollection)
{
    serviceCollection.AddTaurusMvc();
}

public void SetupPipeline(IApplicationBuilder webApp, IWebHostEnvironment hostEnv)
{
    webApp.UseTaurusMvc();
}

Executing the Source Project

Press F5 to launch the application. Successful initialization typically redirects to the built-in administrative dashboard or displays a default landing page, confirming that the routing engine is active.

Integration via NuGet Packages

For production deployments or rapid prototyping, referencing compiled binaries is recommended. Create a new web project matching your target runtime and install the appropriate package through the NuGet Package Manager or CLI:

  • .NET Framework: Install-Package Taurus.MVC
  • .NET Core / .NET 5+: Install-Package Taurus.MVC.Core

Configuring .NET Framework Projects

After package installation, manually register the HTTP module in web.config. The configuration must account for both Classic and Integrated IIS modes:

<configuration>
  <system.web>
    <httpModules>
      <add name="TaurusRoutingModule" type="Taurus.Core.UrlRewrite, Taurus.Core" />
    </httpModules>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <!-- Enable for Integrated Mode -->
      <add name="TaurusRoutingModule" type="Taurus.Core.UrlRewrite, Taurus.Core" />
    </modules>
  </system.webServer>
</configuration>

Configuring .NET Core (Startup-based)

For versions utilizing the traditional Startup.cs pattern, inject the framework services and middleware as follows:

public class ApplicationStartup
{
    public void ConfigureServices(IServiceCollection serviceCollection)
    {
        serviceCollection.AddTaurusMvc();
    }

    public void Configure(IApplicationBuilder webApp, IWebHostEnvironment hostEnv)
    {
        webApp.UseTaurusMvc();
    }
}

Configuring .NET 5+ (Minimal Hosting)

Modern .NET versions use the top-level Program.cs structure. Register the framework before building the host and attach the middleware to the request pipeline:

var hostBuilder = WebApplication.CreateBuilder(args);

// Register framework services
hostBuilder.Services.AddTaurusMvc();

var webApp = hostBuilder.Build();

// Attach routing middleware
webApp.UseTaurusMvc();

webApp.Run();

Initial Runtime Behavior

Launching a freshly configured project without custom controllers will yield different results depending on the framework version. Legacy versions may return a 404 Not Found or prompt for controller implementation. Versions 3.3.1 and above operate in a coexistence mode; if no matching routes are found, the request passes to subsequent middleware components. To render actual content, developers must implement controllers, views, and data models in subsequent development steps.

Tags: Taurus.MVC ASP.NET ASP.NET Core web development Framework Configuration

Posted on Sun, 24 May 2026 17:45:25 +0000 by kingcobra96