Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "wydeedev"

Answer

Hi @ismcagdas

The proposed solution did not worked and the same error keeps happening.

This first piece of code is the module from the project we added to the solution.

` [DependsOn(typeof(AbpEntityFrameworkCoreModule), typeof(AbpAspNetCoreModule))]

public class MyNewCoreModule : AbpModule
{

    public override void Initialize()
    {
        IocManager.RegisterAssemblyByConvention(typeof(MyNewCoreModule).GetAssembly());
    }
    
    public override void PostInitialize()
    {
       IocManager.Resolve<ApplicationPartManager>()
            .AddApplicationPartsIfNotAddedBefore(typeof(MyNewCoreModule).Assembly);
    }
}`

The Entity Framework Core project depends on this new module.

[DependsOn( typeof(AbpZeroCoreEntityFrameworkCoreModule), typeof(MyProjectCoreModule), typeof(AbpZeroCoreIdentityServervNextEntityFrameworkCoreModule), typeof(MyNewCoreModule))] public class MyProjectEntityFrameworkCoreModule : AbpModule { }

This last piece of code depends on the MyProjectEntityFrameworkCoreModule.

[DependsOn( typeof(MyProjectApplicationModule), typeof(MyProjectEntityFrameworkCoreModule), typeof(AbpTestBaseModule))] public class MyProjectTestBaseModule : AbpModule { }

What we found strange is that the application runs without any problem, this error only happens on the unit tests.

Answer

hi @ismcagdas

Our solution is with the same structure than it is provided when we download aspnetzero. This problem started when we added a new project to the solution. The goal of this project is to connect to another database (it is a class library). This project's module has the following dependencies: AbpEntityFrameworkCoreModule and AbpAspNetCoreModule

We reference this project, on our .Application and .EntityFrameworkCore projects. The module on our .EntityFrameworkCore project depends on the module from our new project.

We did not made any change to the test project neither to its module. If the test module depends on the EntityFrameworkCore module, which in turn, depends on our new project's module, is there something we are missing? Or this issue is not related with the new project?

Hi @ismcagdas, thanks for your answer.

I've tried but with no success, it returns the same error as before.

Do you have any workaround for this or how do you manage these kind of issues? Do you enter all the subdomains in order to authorize them? This does not sound like a good solution in the long run.

Showing 1 to 3 of 3 entries