8.0.0, Angular, .NET Core
I need to set a relation between two entities of type A and B to null before deleting entity of type A. I thought I could do that easily with predefined events but it turns out the deleting event handler does not get triggered (also, see [EntityDeletingEventData does not fire on deleting user #1460](https://github.com/aspnetzero/aspnet-zero-core/issues/1460)).
Right now, I call the deleting event handler manually using the event bus before deleting the entity itself:
public async Task DeleteAsync(int id)
{
await EventBus.TriggerAsync(new EntityDeletingEventData<A>(new A { Id = id }));
await _aRepository.DeleteAsync(id);
}
This works as expected but I guess it is not how it is supposed to be done!? Any ideas why the deleting event handler doesn't get triggered properly? Am i missunderstanding something?
8.0.0, Angular, .NET Core
I stumbled accross the following error when trying to run tests I built for one of my app-services:
Required permissions are not granted. At least one of these permissions must be granted: PermissionName
Couldn't find an answer here.
After a couple of hours searching for a solution to this problem it began to dawn on me:
Permissions for this service are dependent on a feature that is not enabled by default (defaultValue: false
in AppFeatureProvider.cs
).
Enabling it by default solved the problem as expected.
Now I have the following question:
I don't want certain features to be enabled by default but still want to test the app-services - Is there a simple solution to this problem without having to manually change the defaulValue
for each feature?
~~7.3.1, Angular, .NET Framework~~ 8.1.0, Angular, .NET Core
We are using Microsoft Office 365 / Exchange Online and our ASPNETZERO-based application sends e-mails using an Office 365 account - all is working fine.
On the 13th of October in 2020 Microsoft will decomission Basic Authentication for Exchange Web Services for Office 365 (read: Upcoming changes to Exchange Web Services (EWS) API for Office 365).
So, we tested to see what this means for our ASPNETZERO-based application and turned off / blocked Basic Authentication for our Office 365 accounts temporarily. Result: Our application was no longer able to authenticate to send the test e-mail.
Are there any plans to implement OAuth for E-Mail?
7.0.0, Angular, .NET Framework
Some of our customers complain about having to login each day they use our product although there is a "remember me" checkbox. The previous version of our product (which was a prototype) was based on plain Asp.NET using cookie authentication and sliding expiration, so they almost never had to login for quite some time. We want to achieve that same user experience they had before again.
So, I was reading a bit about authentication using JWT tokens and refresh tokens and also looking through the source code of ASPNETZERO to see whether refreshing tokens is implemented, which seems it is ... partially!? It seems the Core project fully implements refreshing tokens, but the Angular project does not!? Are there any plans to complete implementation for Angular? Or am I missunderstanding something important here?
7.0.0, Angular, .NET Framework
I'm using metronic's pricing tables 4 but now that I'm upgrading to ASPNETZERO 7.0.0 my select-edition page is broken ... It seems to me the styles are missing - how do I add them back again?
7.0.0, Angular, .NET Framework
I'm having troubles with one of my multi-lingual entities - see log:
ERROR 2019-07-08 15:55:00,824 [13 ] Mvc.ExceptionHandling.AbpExceptionFilter -
Unmapped members were found. Review the types and members below.
Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type
For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters
=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
AutoMapper created this type map for you, but your types cannot be mapped using the current configuration.
Task`1 -> List`1 (Destination member list)
System.Threading.Tasks.Task`1[[System.Collections.Generic.List`1[[CompanyName.ProjectName.EntityFeatures.EntityFeatureTranslation, CompanyName.ProjectName.Core, Version=6.5.0.0, Culture=neutral, PublicKeyToken=null]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] -> System.Collections.Generic.List`1[[CompanyName.ProjectName.Backend.EntityFeatures.Dto.EntityFeatureTranslationBackendDto, CompanyName.ProjectName.Application.Shared, Version=6.5.0.0, Culture=neutral, PublicKeyToken=null]] (Destination member list)
Unmapped properties:
Capacity
AutoMapper.AutoMapperConfigurationException:
Unmapped members were found. Review the types and members below.
Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type
For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters
=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
AutoMapper created this type map for you, but your types cannot be mapped using the current configuration.
Task`1 -> List`1 (Destination member list)
System.Threading.Tasks.Task`1[[System.Collections.Generic.List`1[[CompanyName.ProjectName.EntityFeatures.EntityFeatureTranslation, CompanyName.ProjectName.Core, Version=6.5.0.0, Culture=neutral, PublicKeyToken=null]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] -> System.Collections.Generic.List`1[[CompanyName.ProjectName.Backend.EntityFeatures.Dto.EntityFeatureTranslationBackendDto, CompanyName.ProjectName.Application.Shared, Version=6.5.0.0, Culture=neutral, PublicKeyToken=null]] (Destination member list)
Unmapped properties:
Capacity
bei AutoMapper.ConfigurationValidator.AssertConfigurationIsValid(IEnumerable`1 typeMaps)
bei lambda_method(Closure , Task`1 , List`1 , ResolutionContext )
bei lambda_method(Closure , Object , Object , ResolutionContext )
bei AutoMapper.Mapper.AutoMapper.IMapper.Map[TDestination](Object source)
bei CompanyName.ProjectName.Backend.EntityFeatures.EntityFeatureBackendAppService.<GetTranslationsForEntityFeaturePagedAndSortedAsync>d__14.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei lambda_method(Closure , Object )
bei Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.<Execute>d__0.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
bei Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
bei Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__13.MoveNext()
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
bei Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__24.MoveNext()
Here are the involved classes:
public class EntityFeature : FullAuditedEntity, IMultiLingualEntity<EntityFeatureTranslation>, IPassivable
{
[Required]
[MaxLength(EntityConsts.EntityFeature.MaxLengthLabelCssClasses)]
public virtual string LabelCssClasses { get; set; }
[Required]
[MaxLength(EntityConsts.EntityFeature.MaxLengthIconCssClasses)]
public virtual string IconCssClasses { get; set; }
public virtual bool IsActive { get; set; }
public virtual ICollection<EntityFeatureTranslation> Translations { get; set; }
}
public class EntityFeatureTranslation : AuditedEntity, IEntityTranslation<EntityFeature>
{
[Required]
[MaxLength(EntityConsts.EntityFeature.MaxLengthName)]
public virtual string Name { get; set; }
[Required]
[MaxLength(EntityConsts.EntityFeature.MaxLengthTitleHtmlTag)]
public virtual string TitleHtmlTag { get; set; }
public virtual EntityFeature Core { get; set; }
public virtual int CoreId { get; set; }
[Required]
[MaxLength(EntityConsts.Translation.MaxLengthLanguage)]
public virtual string Language { get; set; }
}
public class EntityFeatureBackendDto : FullAuditedEntityDto, IPassivable
{
public string Name { get; set; }
public string TitleHtmlTag { get; set; }
public string LabelCssClasses { get; set; }
public string IconCssClasses { get; set; }
public bool IsActive { get; set; }
public ICollection<EntityFeatureTranslationBackendDto> Translations { get; set; }
}
public class EntityFeatureTranslationBackendDto : AuditedEntityDto
{
public string Name { get; set; }
public string TitleHtmlTag { get; set; }
public string Language { get; set; }
}
There are other multi-lingual entities as well, all of them working as expected. Any ideas what's wrong with this one?
6.9.1, Angular, .NET Framework
I'm trying to implement notifications similar to NewTenantRegisteredAsync(...)
of AppNotifier.cs
to inform host users about entities being created by tenant users. But none of the notifications ever seem to show up. So I tried with NewTenantRegisteredAsync(...)
as my implementation is very similar and I only got one notification out of 4 test runs ... Also, the one notification that I received took a couple of minutes to show up ... In database there also is only the one notification.
Other notifications seem to work fine (e.g. WelcomeToTheApplicationAsync(..)
and GdprDataPrepared(...)
).
6.9.1, Angular, .NET Framework
After successfully test-hosting our application on Azure for several months, we want to host it on-premises as the application is still under development.
Unfortunately, there seems to be an issue with CORS:
We just changed URLs in appsettings.production.json
and appconfig.production.json
.
This is what appsettings.production.json
looks like:
This is what appconfig.production.json
looks like:
Is there anything else we are missing for hosting on IIS?
6.9.1, Angular, .NET Framework
I was wondering if it was possible for you (ASPNETZERO Team) to implement some new predefined events that will be triggered before actual changes are made to repository, so we could register some event-handlers like:
EntityBeforeCreatingEventData<TEntity>
EntityBeforeUpdatingEventData<TEntity>
I'm asking because when handling existing 'ing'-events, changes to the repository are already 'commited' (but the transaction is not) resulting in:
EntityCreatingEventData<TEntity>
)EntityUpdatingEventData<TEntity>
)What do you think about it?
6.8.0, Angular, .NET Framework
Is it possible to extend default localization resources like described here?: Extending Localization Sources
I'm asking because I get the following error when I try to do so:
FATAL 2019-03-29 13:39:47,595 [1 ] Abp.AbpBootstrapper - Abp.AbpInitializationException: ProjectName source contains more than one dictionary for the culture: en
bei Abp.Localization.Dictionaries.Xml.XmlEmbeddedFileLocalizationDictionaryProvider.Initialize(String sourceName)
bei Abp.Localization.MultiTenantLocalizationSource.Initialize(ILocalizationConfiguration configuration, IIocResolver iocResolver)
bei Abp.Localization.LocalizationManager.InitializeSources()
bei Abp.AbpKernelModule.PostInitialize()
bei System.Collections.Generic.List`1.ForEach(Action`1 action)
bei Abp.AbpBootstrapper.Initialize()
Abp.AbpInitializationException: ProjectName source contains more than one dictionary for the culture: en
bei Abp.Localization.Dictionaries.Xml.XmlEmbeddedFileLocalizationDictionaryProvider.Initialize(String sourceName)
bei Abp.Localization.MultiTenantLocalizationSource.Initialize(ILocalizationConfiguration configuration, IIocResolver iocResolver)
bei Abp.Localization.LocalizationManager.InitializeSources()
bei Abp.AbpKernelModule.PostInitialize()
bei System.Collections.Generic.List`1.ForEach(Action`1 action)
bei Abp.AbpBootstrapper.Initialize()
FATAL 2019-03-29 13:39:47,700 [1 ] soft.AspNetCore.Hosting.Internal.WebHost - Application startup exception
Abp.AbpInitializationException: ProjectName source contains more than one dictionary for the culture: en
bei Abp.Localization.Dictionaries.Xml.XmlEmbeddedFileLocalizationDictionaryProvider.Initialize(String sourceName)
bei Abp.Localization.MultiTenantLocalizationSource.Initialize(ILocalizationConfiguration configuration, IIocResolver iocResolver)
bei Abp.Localization.LocalizationManager.InitializeSources()
bei Abp.AbpKernelModule.PostInitialize()
bei System.Collections.Generic.List`1.ForEach(Action`1 action)
bei Abp.AbpBootstrapper.Initialize()
bei Abp.AspNetCore.AbpApplicationBuilderExtensions.InitializeAbp(IApplicationBuilder app)
bei Abp.AspNetCore.AbpApplicationBuilderExtensions.UseAbp(IApplicationBuilder app, Action`1 optionsAction)
bei CompanyName.ProjectName.Web.Startup.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
My folder structure for localization resources looks like this:
ProjectNameLocalizationConfigurer.cs looks like this:
public static void Configure(ILocalizationConfiguration localizationConfiguration)
{
localizationConfiguration.Sources.Add(
new DictionaryBasedLocalizationSource(
ProjectNameConsts.LocalizationSourceName,
new XmlEmbeddedFileLocalizationDictionaryProvider(
typeof(ProjectNameLocalizationConfigurer).GetAssembly(),
"CompanyName.ProjectName.Localization.ProjectName"
)
)
);
localizationConfiguration.Sources.Extensions.Add(
new LocalizationSourceExtensionInfo(
"(ProjectName",
new XmlEmbeddedFileLocalizationDictionaryProvider(
typeof(ProjectNameLocalizationConfigurer).GetAssembly(),
"CompanyName.ProjectName.Localization.ProjectNameExtended"
)
)
);
}
Please, advise!
EDIT: Removed project name from code-block