Base solution for your next web application

Activities of "gvb"

hey,

As i know from ABP & Module Zéro, it is a solution to start a lot of different type of project.

So for an Internet Store with public area and authenticated area, I would use ABP & Module Zero together. We have done many projects with this Framework and the overall is pretty good and saved so much time....!

Add the fact that it is Open-Source, you can learn from it and become stronger with the framework!

Answer

ok thx for the return.

i will try to put the error to return to client while i'm in developpment! then turn off for production.

Answer

Hmm i found my error!

But i don't understand why it doesn't get logged in ABP ?

The problem was i tried to resolve something with the IoCManager and i forgot to register my class in the initialization of the module... all my fault!

So when the Dynamic WebAPI Constructor was called, it was throwing an exception.... that i doesn't see anywhere in my logs

There is no trace in Elmah, NLog and Abp Audit. Is it Possible to get Infos of Controller that fail in their constructor?

Answer

bump

Question

Trying to port an old web site to ABP and i'm getting an error while trying to execute the addQuoteService I started from the Zero template.

Error: [object Object]
Abp error : Error :
Abp Log: None
Doesn't reach Elmah, Doesn't reach NLog.

code :

vm.add = function () {
     vm.saving = true;

    addQuoteService.execute(vm.newQuote).then(
         function (response) {
             $location.path('quote-list');
         },
          function (errorResponse) {
              vm.saving = false;
});
vm.newQuote = {
    sapProjectNo: '1',
    description: 'project'
}

my service is injected and is in Type=allAngular....

What's wrong ?

Here is my code for the overriding of the settings

I use those using statement :

using Abp.Configuration; using Abp.Net.Mail;

Setting Provider :

public override IEnumerable<SettingDefinition> GetSettingDefinitions(SettingDefinitionProviderContext context)
        {
            return new[]
                {
                     new SettingDefinition(
                        EmailSettingNames.Smtp.Host,
                        string.Empty
                        ),
                    new SettingDefinition(
                        EmailSettingNames.Smtp.Port,
                        string.Empty
                        ),
                    new SettingDefinition(
                        EmailSettingNames.Smtp.UserName,
                        string.Empty
                        ),
                    new SettingDefinition(
                        EmailSettingNames.Smtp.Password,
                        string.Empty
                        ),
                    new SettingDefinition(
                        EmailSettingNames.Smtp.EnableSsl,
                        string.Empty
                        ),
                    new SettingDefinition(
                        EmailSettingNames.Smtp.UseDefaultCredentials,
                        string.Empty
                        )
                };
        }

Seeder

if (!_context.Settings.Any())
            {
                _context.Settings.Add(new Abp.Configuration.Setting
                {
                    Name = EmailSettingNames.Smtp.Host,
                    Value = "smtp.gmail.com"
                });

                _context.Settings.Add(new Abp.Configuration.Setting
                {
                    Name = EmailSettingNames.Smtp.Port,
                    Value = "587"
                });

                _context.Settings.Add(new Abp.Configuration.Setting
                {
                    Name = EmailSettingNames.Smtp.UserName,
                    Value = EMAILVALUE
                });

                _context.Settings.Add(new Abp.Configuration.Setting
                {
                    Name = EmailSettingNames.Smtp.Password,
                    Value = PASSWORD VALUE
                });

                _context.Settings.Add(new Abp.Configuration.Setting
                {
                    Name = EmailSettingNames.Smtp.EnableSsl,
                    Value = "true"
                });

                _context.Settings.Add(new Abp.Configuration.Setting
                {
                    Name = EmailSettingNames.Smtp.UseDefaultCredentials,
                    Value = "false"
                });
            }
Answer

ok here is a part of my log that show something that is bad

DEBUG 2015-10-08 12:37:06,723 [1 ] Abp.Modules.AbpModuleManager - Loading Abp modules... DEBUG 2015-10-08 12:37:08,505 [1 ] Abp.Modules.AbpModuleManager - Found 13 ABP modules in total. DEBUG 2015-10-08 12:37:08,509 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AutoMapper.AbpAutoMapperModule, Abp.AutoMapper, Version=0.7.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,511 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.AbpKernelModule, Abp, Version=0.7.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,511 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.EntityFramework.AbpEntityFrameworkModule, Abp.EntityFramework, Version=0.7.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,511 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.WebApi.AbpWebApiModule, Abp.Web.Api, Version=0.7.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,511 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.AbpWebModule, Abp.Web, Version=0.7.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,511 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Web.Mvc.AbpWebMvcModule, Abp.Web.Mvc, Version=0.7.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,512 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.AbpZeroCoreModule, Abp.Zero, Version=0.7.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,512 [1 ] Abp.Modules.AbpModuleManager - Loaded module: Abp.Zero.EntityFramework.AbpZeroEntityFrameworkModule, Abp.Zero.EntityFramework, Version=0.7.1.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,512 [1 ] Abp.Modules.AbpModuleManager - Loaded module: GenisysIntranet.GenisysIntranetApplicationModule, GenisysIntranet.Application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,512 [1 ] Abp.Modules.AbpModuleManager - Loaded module: GenisysIntranet.GenisysIntranetCoreModule, GenisysIntranet.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,512 [1 ] Abp.Modules.AbpModuleManager - Loaded module: GenisysIntranet.GenisysIntranetDataModule, GenisysIntranet.EntityFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,512 [1 ] Abp.Modules.AbpModuleManager - Loaded module: GenisysIntranet.Web.GenisysIntranetWebModule, GenisysIntranet.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,512 [1 ] Abp.Modules.AbpModuleManager - Loaded module: GenisysIntranet.Api.GenisysIntranetWebApiModule, GenisysIntranet.WebApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null DEBUG 2015-10-08 12:37:08,516 [1 ] Abp.Modules.AbpModuleManager - 13 modules loaded. DEBUG 2015-10-08 12:37:10,166 [1 ] Abp.Localization.LocalizationManager - Initializing 4 localization sources. DEBUG 2015-10-08 12:37:10,170 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: Abp DEBUG 2015-10-08 12:37:10,171 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpZero DEBUG 2015-10-08 12:37:10,171 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: GenisysIntranet DEBUG 2015-10-08 12:37:10,179 [1 ] Abp.Localization.LocalizationManager - Initialized localization source: AbpWeb DEBUG 2015-10-08 12:37:11,367 [1 ] Abp.AutoMapper.AbpAutoMapperModule - Found 3 classes defines auto mapping attributes DEBUG 2015-10-08 12:37:11,367 [1 ] Abp.AutoMapper.AbpAutoMapperModule - GenisysIntranet.Sessions.Dto.TenantLoginInfoDto DEBUG 2015-10-08 12:37:11,492 [1 ] Abp.AutoMapper.AbpAutoMapperModule - GenisysIntranet.Sessions.Dto.UserLoginInfoDto DEBUG 2015-10-08 12:37:11,501 [1 ] Abp.AutoMapper.AbpAutoMapperModule - GenisysIntranet.Web.Models.Account.TenantSelectionViewModel+TenantInfo DEBUG 2015-10-08 12:37:11,553 [1 ] Default - Dynamic web api controller is created for type 'GenisysIntranet.Roles.IRoleAppService' with service name 'app/role'. DEBUG 2015-10-08 12:37:11,554 [1 ] Default - Dynamic web api controller is created for type 'GenisysIntranet.Users.IUserAppService' with service name 'app/user'. DEBUG 2015-10-08 12:37:11,555 [1 ] Default - Dynamic web api controller is created for type 'GenisysIntranet.Sessions.ISessionAppService' with service name 'app/session'. ERROR 2015-10-08 12:37:33,675 [13 ] lers.Filters.AbpExceptionFilterAttribute - Abp.AbpException: There is no tenant with id: 1 at Abp.MultiTenancy.AbpTenantManager`3.

Why are you trying to get Tenant Id 1 ??? There is no reason to HardCode those type of data!?

my tenant id was 2 in database because i tried something....

Question

I try to seed Data in my Tenant, User, Role from the InitialDataBuilder and i get this error

Can not set TenantId to a different value than the current filter parameter value or IAbpSession.TenantId while MayHaveTenant filter is enabled!

It should not be active because i did all as usual....

In Core Module Configuration.MultiTenancy.IsEnabled = false;

in Seed context.DisableAllFilters(); new InitialDataBuilder(context).Build();

I dont know how to fix it when i already did the normal thing to remove the filters. Can someone help me plz.

i dont want to need to hack the framework to put a Session in Seeder...

Use FixedLocalizableString with the string you want to display inside the FixedLocalizableString.

It wont be localized and the display will be the exact same string as you wrote in the class.

Answer

Yea, it use the same mechanic.

how can i disable it in ABP ?

Showing 1 to 10 of 53 entries