I try to test our method that derived from ApplicationService and I try to validate my permission via IPermissionChecker.Authorize.
When I test it I receive
Abp.AbpException
No language defined!
in Abp.Localization.MultiTenantLocalizationDictionaryProvider.GetDefaultDictionary()
in Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource.GetStringOrNull(String name, CultureInfo culture, Boolean tryDefaults)
in Abp.Localization.Dictionaries.DictionaryBasedLocalizationSource.GetString(String name, CultureInfo culture)
in Abp.Localization.LocalizableString.Localize(ILocalizationContext context)
in System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
in System.Linq.Buffer`1..ctor(IEnumerable`1 source)
in System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
in Abp.Authorization.PermissionCheckerExtensions.LocalizePermissionNames(IPermissionChecker permissionChecker, String[] permissionNames)
in Abp.Authorization.PermissionCheckerExtensions.<AuthorizeAsync>d__9.MoveNext()
I look into base test project but I don't find anithing related to Localization/Language, how can I solve it?
Hi @ismcagdas
I found a solution but is not related to a ABP/Zero bug Framework all depends in wich way Angular close / cancel connection.
In any way I use this solution angular-how-to-cancel-http-calls-on-router-change
I put it on root.module.ts so now when user change route all connection receive cancellation and it close the flow if is implemented.
Please answer the following questions before submitting an issue.
I try to send a cancellation request from Angular client (use Observable -> unsubscribe) to cancel long Task Operation but API not fire.
[HttpPost]
public async Task<GetDataOutputDto> GetDataLongOperation(CustomInputDto input)
{
try
{
var tokenSource = new CancellationTokenSource(); // _httpContextAccessor.HttpContext.RequestAborted;
tokenSource.CancelAfter(2500);
var token = _httpContextAccessor.HttpContext.RequestAborted; //tokenSource.Token;
var settings = new JsonSerializerSettings
{
Error = (sender, args) => {
args.ErrorContext.Handled = true;
},
MissingMemberHandling = MissingMemberHandling.Ignore
};
//... remove for brev
}
on angular side
this.subscription = this.loadData(undefined).subscribe(res=>{
console.log('data loaded!');
this.localData = res.data;
//this._rawData = this.localData;
this.loadItems();
});
setTimeout(() => {
console.log('TEST stop long')
this.subscription.unsubscribe();
}, 2500);
I test that if I use TaskSource with CancelAfter all code behind work well but from web (client side) I can't fire the cancellation operation
Hi @peopleteq
I think the only way is create your custom pipe (based on orignal) because the second args is varibale array or use a special notation to identify when first element off args is localization key (es. '##') so in this way you can add an if and call l or ls function
Hi @ismcagdas
I kno very well that momen!
I check on stats and I see that I've Tlerik, moment and Angular that consume, more or less the 75% of space, so I don't find a specific problem. If I remove Terlik I can reduce the size about 1 Mb. I'm waitng if you find any tricks to reduce it.
We move our solution to .NET Core and Angular (AbpZero 7.1.0).
When I compile in production the build process create a main.js more the 5 Mb.
Is it possibile to reduce it? How can I check if I've some configuration error?
Regards
Ok thanks for your reply.
I
I add a custom interface to a DTO on a object defined on Application.Shared. If i use a IConventionalDependencyRegistrar to register it I don't find my object. My project is based on ABP 4.8.1 .NETCore (4.6.1)
For more complete understaning my landscape if I move my object to Application it is register it in correct way.
So my question is how to solve this issue because Application.Shared is used on Xmarin and is not a module, I need to convert it into a module? If yes is need to use a #IF #ENDIF statement on compilation to prevent module definition for Xamarin?
Ok thanks for your support