Base solution for your next web application

Activities of "vladsd"

@aaron, domain service is where the logic lies. do you have suggestion on how to get the changes of the context of the objects without relying on yourRepository.GetDbContext().ChangeTracker

@mailming, thanks, but domain service in core package which does not have relationship with yourRepository, as that one includes core package.

@aaron - here is a use case I have a domain service, which does bunch of works on various financial accounts part of unit of work. That works creates a number of affects, which I need to capture and validate.

If I wait till SaveChanges, then its too late. I need to get all those changes myself before SaveChanges is called. Hope it helps.

Thanks for the great tips! What about watching real time app profiling, can it log into console or file?

i saw that, to handle localized dates, one can just use toShortDateString() https://docs.microsoft.com/en-us/dotnet/api/system.datetime.toshortdatestring?view=netcore-2.1

Another issue is using local file for date formats like this: '<text name="DateFormatShort">MM.dd.yyyy</text>'

of ChartDateFormat which not used anywhere?

we saw that issue on one of the servers from our farm. it turned out that server had core 2.1.4 sdk installed. once uninstalled, that server worked again. framework has cors check, make sure to disable it with .AllowAnyOrigin() if you do not want it in startup.cs

Better solution is to override AuthorizationHelper -> AuthorizeAsync method and check there

@ryancyq sorry, it still does not solve my issue as I need IP check on all calls, now I need to add ClientIpAuthorize to all API calls! What about abp framework, I cannot access those like one for GetAll, etc.

For all users, anonymous user and registered, I need to intercept all API calls and check against IP list in tenant table. The solutions above do not provide for it.

Putting TenantManager reference in Startup causes issues InvalidOperationException: Unable to resolve service for type 'MyProject.MultiTenancy.TenantManager' while attempting to activate 'MyProject.Web.Startup.Startup'.

//https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-2.1

           app.Use(async (context, next) =>
           {
               // Do work that doesn't write to the Response.
               if(! await _tenantManager.ValidateIPAddress())
               {
                   throw new AbpAuthorizationException();
               }

               await next.Invoke();
           });

It turns out, that you need to include metronic directives into the same place as actual component that uses, in our case, we had common module, which is shared, that is a place to include.

Showing 1 to 10 of 116 entries