Web Studio is here! An enhanced experience to make it easier to create, preview, and collaborate on your website contentLearn More
1. Download the Nuget package Agility Fetch API
2. Import required packages in Startup.cs
using Agility.NET.FetchAPI.Helpers;
using Agility.NET.FetchAPI.Services;
2.
Add FetchApiService
to ConfigureServices
in Startup.cs
services.AddHttpClient<FetchApiService>();
Agility Fetch API does not have a dependency on Agility Core and can be used without. Agility Core package both Pagement Management and URL Redirects are dependant on Agility Fetch API.
1. Download the Nuget package Agility Core
2. Import required packages in Startup.cs
using Agility.NET.Core.Domain;
2. Add AgilityRouteTransformer
to ConfigureServices
in Startup.cs
services.AddSingleton<AgilityRouteTransformer>();
3. Add UseEndpoints
to Configure
in Startup.cs
app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
endpoints.MapDynamicPageRoute<AgilityRouteTransformer>("/{**slug}");
});
1. Download the Nuget package Agility Core
2. Import required packages in Startup.cs
using Agility.NET.Core.Domain;
3. Add AgilityRedirectMiddleware
to Configure
in Startup.cs
app.UseMiddleware<AgilityRedirectMiddleware>();
You can use Page Management with Agility URL Redirects or implement your own Middleware.