Base solution for your next web application
Open Closed

Exception: Can't create component 'Abp.AspNetCore.Mvc.Antiforgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter' #12066


User avatar
0
razkhan78 created

Hi Team,

We are upgrading our existing application (Asp.net Core MVC + Jquery with framework .net2.1 and version 6.2.1.) to .net 8 and version 13.1.1. following documentation (Version-Updating).

In Startup.cs we have added below line // MVC var mvcBuilder = services.AddControllersWithViews(options => { options.Filters.Add(new AbpAutoValidateAntiforgeryTokenAttribute()); options.AddAbpHtmlSanitizer(); });

We are facing below exception when project runs.

Exception: HandlerException: Can't create component 'Abp.AspNetCore.Mvc.Antiforgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter' as it has dependencies to be satisfied. 'Abp.AspNetCore.Mvc.Antiforgery.AbpAutoValidateAntiforgeryTokenAuthorizationFilter' is waiting for the following dependencies: - Service 'Castle.Core.Logging.ILogger' which was not registered.


1 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @razkhan78,

    Does your upgraded project have the same NuGet packages as the new version? Especially for Castle packages