diff --git a/src/DotVVM.Framework/Hosting/DotvvmRequestContextExtensions.cs b/src/DotVVM.Framework/Hosting/DotvvmRequestContextExtensions.cs index b7c17f8efd..3edc05feb0 100644 --- a/src/DotVVM.Framework/Hosting/DotvvmRequestContextExtensions.cs +++ b/src/DotVVM.Framework/Hosting/DotvvmRequestContextExtensions.cs @@ -116,7 +116,7 @@ public static void RedirectToRoutePermanent(this IDotvvmRequestContext context, } public static void SetRedirectResponse(this IDotvvmRequestContext context, string url, int statusCode = (int)HttpStatusCode.Redirect, bool replaceInHistory = false, bool allowSpaRedirect = false) => - context.Services.GetRequiredService().WriteRedirectResponse(context.HttpContext, url, statusCode, replaceInHistory, allowSpaRedirect); + context.Configuration.ServiceProvider.GetRequiredService().WriteRedirectResponse(context.HttpContext, url, statusCode, replaceInHistory, allowSpaRedirect); ///