Base solution for your next web application
Open Closed

Error about AbpBootstrapper of ASP.NET Boilerplate #7067


User avatar
0
HIPT created

Hi !

I have winform project to put a file to server, using AbpBootstrapper of ASP.NET Boilerplate. When I run project, the exception has been throwed:

'Method 'ExecuteActionFilterAsync' in type 'Abp.WebApi.Validation.AbpApiValidationFilter' from assembly 'Abp.Web.Api, Version=4.5.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.'

My code is here:


public IDisposableDependencyObjectWrapper<BankingAuditClient> GetBAClient()
        {
            if (baClient != null)
                return baClient;
            else
            {
                if (bootstrapper == null)
                {
                    bootstrapper = AbpBootstrapper.Create<BankingAuditModule>();
                    bootstrapper.Initialize();
                }
                baClient = bootstrapper.IocManager.ResolveAsDisposable<BankingAuditClient>();
                baClient.Object.UserName = "admin";
                baClient.Object.Password = "123qwe";
                baClient.Object.TokenBasedAuth();
                return baClient;
            }
        }

How can I fix it?


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @HIPT

    Could you also share the full stacktrace of the error message ?

    Thanks,

  • User Avatar
    0
    HIPT created

    The full stacktrace of the error message:

    ************** Exception Text ************** System.TypeLoadException: Method 'ExecuteActionFilterAsync' in type 'Abp.WebApi.Validation.AbpApiValidationFilter' from assembly 'Abp.Web.Api, Version=4.5.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes) at System.Reflection.RuntimeAssembly.GetExportedTypes() at Castle.Core.Internal.ReflectionUtil.GetAvailableTypes(Assembly assembly, Boolean includeNonExported) at Castle.Core.Internal.ReflectionUtil.GetAvailableTypesOrdered(Assembly assembly, Boolean includeNonExported) at Castle.MicroKernel.Registration.FromAssemblyDescriptor.b__5_0(Assembly a)

    at System.Linq.Enumerable.d__172.MoveNext() at Castle.MicroKernel.Registration.FromDescriptor.Castle.MicroKernel.Registration.IRegistration.Register(IKernelInternal kernel) at Castle.MicroKernel.Registration.BasedOnDescriptor.Castle.MicroKernel.Registration.IRegistration.Register(IKernelInternal kernel) at Castle.MicroKernel.DefaultKernel.Register(IRegistration[] registrations) at Castle.Windsor.WindsorContainer.Register(IRegistration[] registrations) at Abp.WebApi.Controllers.ApiControllerConventionalRegistrar.RegisterAssembly(IConventionalRegistrationContext context) at Abp.Dependency.IocManager.RegisterAssemblyByConvention(Assembly assembly, ConventionalRegistrationConfig config) at Abp.Dependency.IocManager.RegisterAssemblyByConvention(Assembly assembly) at Abp.WebApi.AbpWebApiModule.Initialize() at Abp.Modules.AbpModuleManager.<>c.<StartModules>b__15_1(AbpModuleInfo module) at System.Collections.Generic.List1.ForEach(Action1 action) at Abp.Modules.AbpModuleManager.StartModules() at Abp.AbpBootstrapper.Initialize() at KTNN.TCNH.Business.BusinessLogic.GetBAClient() in D:\Works\CuongNM\KTNN_HopPhan1\SVN_Onsite\KTNN_15_PhatTrien\02_CCHT\sourcecode\AE_Oracle\KTNN.TCNH.Business\BusinessLogic.cs:line 1268 at KTNN.TCNH.Business.BusinessLogic.UploadFormedReports(IEnumerable1 reportDtos) in D:\Works\CuongNM\KTNN_HopPhan1\SVN_Onsite\KTNN_15_PhatTrien\02_CCHT\sourcecode\AE_Oracle\KTNN.TCNH.Business\BusinessLogic.cs:line 1279

    at KTNN.TCNH.UI.Client.ThuThapDL.MauBieu.FrmThuThapTheoMauBieu.BtnUpload_ItemClick(Object sender, ItemClickEventArgs e) in D:\Works\CuongNM\KTNN_HopPhan1\SVN_Onsite\KTNN_15_PhatTrien\02_CCHT\sourcecode\AE_Oracle\KTNN.TCNH\UI\Client\ThuThapDL\MauBieu\FrmThuThapTheoMauBieu.cs:line 136 at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link) at DevExpress.XtraBars.BarButtonItem.OnClick(BarItemLink link) at DevExpress.XtraBars.BarItemLink.OnLinkClick() at DevExpress.XtraBars.BarButtonItemLink.OnLinkClick() at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs) at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs) at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link) at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link) at DevExpress.XtraBars.Ribbon.Handler.BaseRibbonHandler.OnUnPressItem(DXMouseEventArgs e, RibbonHitInfo hitInfo) at DevExpress.XtraBars.Ribbon.Handler.BaseRibbonHandler.OnUnPress(DXMouseEventArgs e, RibbonHitInfo hitInfo) at DevExpress.XtraBars.Ribbon.Handler.RibbonHandler.OnUnPress(DXMouseEventArgs e, RibbonHitInfo hitInfo) at DevExpress.XtraBars.Ribbon.Handler.BaseRibbonHandler.OnMouseUp(DXMouseEventArgs e) at DevExpress.XtraBars.Ribbon.Handler.RibbonHandler.OnMouseUp(DXMouseEventArgs e) at DevExpress.XtraBars.Ribbon.RibbonControl.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at DevExpress.Utils.Controls.ControlBase.WndProc(Message& m) at DevExpress.XtraBars.Ribbon.RibbonControl.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

  • User Avatar
    0
    ismcagdas created
    Support Team

    Add a depends on to AbpWebApiModule for your module. Something like this:

    [DependsOn(AbpWebApiModule)]
    public class MyTestModule : AbpModule
    {
        // other code blocks
    }