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

Activities of "ajayak"

I followed all the steps but the new generated theme does not have the color that's defined by me in MetronicThemeChanger.Themes class.

I even tried changing color of yellow theme to #E80C7A for testing and ran the tool. But even then I can't find E80C7A in any file generated in yellow folder.

On UI, it appears as default color. Is there any step missing on <a class="postlink" href="https://github.com/aspnetzero/metronic">https://github.com/aspnetzero/metronic</a> ?

Hi,

I have created a background worker that should run on 1st of every month. I can easily do this using hangfire cron jobs but I'm not sure, what is the effect of Timer.Period property has on this.

If I skip entering the timer property, I get exception. If I fill Timer property, I don't want the code to execute on any other day than 1st of every month.

What is the best approach to achieve this? :D

I'm using something like below:

RecurringJob.AddOrUpdate<InvoiceBackgroundWorker>(job => job.Start(), Cron.MonthInterval(0));
Question

I want to extend the default Logger to log errors to Sentry.

How can I extend the Logger implementation? I want to use the base logging functionality with the addition of my custom code.

I have followed all the steps mentioned in <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Hangfire-Integration">https://aspnetboilerplate.com/Pages/Doc ... ntegration</a> for hangfire integration in .Net Core solution.

When I goto projectUrl/hangfire, I see the error: This page isn’t working If the problem continues, contact the site owner. HTTP ERROR 401

How can I view this page, with Authorization enabled?

I did manual subscription as follow:

private async Task SubscribeCustomerToNotifications(int customerTenantId, LP lpUser, DateTime agreementEndDate)
        {
            var customerTenantUserIds = await UserManager.Users.IgnoreQueryFilters()
                .Where(c => c.TenantId == customerTenantId && !c.IsDeleted)
                .Select(c => c.Id)
                .ToListAsync();
            foreach (var userId in customerTenantUserIds)
            {
                await _notificationSubscriptionManager.SubscribeAsync(
                    new UserIdentifier(customerTenantId, userId), AppNotificationNames.InvoiceGenerated);
            }
        }

and added notification in AppNotificationsProvider as:

context.Manager.Add(
                new NotificationDefinition(
                    AppNotificationNames.InvoiceGenerated,
                    displayName: L("InvoiceGenerated"),
                    permissionDependency: new SimplePermissionDependency(AppPermissions.Pages_PP_SC)
                )
            );

Is it really required for the manual subscription? I see that this notification works fine without explicit subscription:

context.Manager.Add(
                new NotificationDefinition(
                    AppNotificationNames.InvoicePaid,
                    displayName: L("InvoicePaid"),
                    permissionDependency: new SimplePermissionDependency(AppPermissions.Pages_PP_LPA)
                )
            );

Note: These issues with aspnet core library updates to 2.1.0

  1. EF Core 2.1.0 Issue: Null Reference exception My Code:
var query = TenantManager.Tenants
                    .Where(c => !c.isA && !c.IsDeleted)
                    .Select(c => new E
                    {
                       X = c.B
                        TenancyName = c.TenancyName
                    })
                    .WhereIf(!input.Filter.IsNullOrEmpty(), c => c.se.Contains(input.Filter))
                    .WhereIf(input.CreatedDaysLessThan.HasValue && input.CreatedDaysLessThan > 0, c => c.DaysSinceRegistered <= input.CreatedDaysLessThan)
                    .WhereIf(input.CreatedDaysMoreThan.HasValue && input.CreatedDaysMoreThan > 0, c => c.DaysSinceRegistered >= input.CreatedDaysMoreThan);

                query =
                    (from q in query
                     join sc in _scRepository.GetAll()
                         .Where(c => c.IsTest != input.HasRealData)
                         .WhereIf(!input.ShowDeleted, c => !c.IsDeleted)
                         .DefaultIfEmpty()
                     on q.TenantId equals sc.TenantId
                     select q).DistinctBy(c => c.TenantId);

                var totalCount = await query.CountAsync();

In my code, the join has 0 result and throws an exception on Count.

Mvc.ExceptionHandling.AbpExceptionFilter - Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.TaskLiftingExpressionVisitor.VisitMember(MemberExpression memberExpression)
   at System.Linq.Expressions.MemberExpression.Accept(ExpressionVisitor visitor)
   at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
   at System.Linq.Expressions.ExpressionVisitor.VisitMethodCall(MethodCallExpression node)
   at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
   at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
   at System.Linq.Expressions.ExpressionVisitor.VisitMember(MemberExpression node)
   at System.Linq.Expressions.MemberExpression.Accept(ExpressionVisitor visitor)
   at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
   at System.Linq.Expressions.ExpressionVisitor.VisitMemberAssignment(MemberAssignment node)
   at System.Linq.Expressions.ExpressionVisitor.VisitMemberBinding(MemberBinding node)
   at System.Linq.Expressions.ExpressionVisitor.Visit[T](ReadOnlyCollection`1 nodes, Func`2 elementVisitor)
   at System.Linq.Expressions.ExpressionVisitor.VisitMemberInit(MemberInitExpression node)
   at System.Linq.Expressions.MemberInitExpression.Accept(ExpressionVisitor visitor)
   at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
  1. If you are using NodeServices, don't update to 2.1.0 for now. Below is the exception thrown by working code in 2.0.4.
ERROR 2018-06-14 17:38:38,223 [50   ] ory.Exporting.InventoryReportPdfExporter - The operation was canceled.
System.Threading.Tasks.TaskCanceledException: The operation was canceled. ---> System.IO.IOException: Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request. ---> System.Net.Sockets.SocketException: The I/O operation has been aborted because of either a thread exit or an application request
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
   at System.Net.Http.HttpConnection.FillAsync()
   at System.Net.Http.HttpConnection.ReadNextResponseHeaderLineAsync(Boolean foldedHeadersAllowed)
   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   at Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance.InvokeExportAsync[T](NodeInvocationInfo invocationInfo, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.InvokeExportAsync[T](CancellationToken cancellationToken, String moduleName, String exportNameOrNull, Object[] args)
   at Microsoft.AspNetCore.NodeServices.NodeServicesImpl.InvokeExportWithPossibleRetryAsync[T](String moduleName, String exportedFunctionName, Object[] args, Boolean allowRetry, CancellationToken cancellationToken)
   at PrimePenguin.Technology.DataExporting.Pdf.PdfExporterBase.CreatePdfPackage(String fileName, String title, String[] headers, List`1 body) in D:\PrimePenguin\PrimePenguin.Service\src\PrimePenguin.Technology.Application\DataExporting\Pdf\PdfExporterBase.cs:line 55
WARN  2018-06-14 17:38:38,412 [68   ] Mvc.ExceptionHandling.AbpExceptionFilter - Failed to generate a downloadable PDF. Please contact admin.
Abp.UI.UserFriendlyException: Failed to generate a downloadable PDF. Please contact admin.
   at PrimePenguin.Technology.DataExporting.Pdf.PdfExporterBase.CreatePdfPackage(String fileName, String title, String[] headers, List`1 body) in D:\PrimePenguin\PrimePenguin.Service\src\PrimePenguin.Technology.Application\DataExporting\Pdf\PdfExporterBase.cs:line 67
   at PrimePenguin.Technology.Reports.Inventory.Exporting.InventoryReportPdfExporter.ExportToFile(List`1 inventoryItemDtos) in D:\PrimePenguin\PrimePenguin.Service\src\PrimePenguin.Technology.Application\Reports\Inventory\Exporting\InventoryReportPdflExporter.cs:line 30
   at PrimePenguin.Technology.Reports.Inventory.InventoryReportAppService.GetInventoryListToPdf(GetInventoryListInput input) in D:\PrimePenguin\PrimePenguin.Service\src\PrimePenguin.Technology.Application\Reports\Inventory\InventoryReportAppService.cs:line 115
   at lambda_method(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()

Hi,

I want to change the default setting "App.UserManagement.AllowSelfRegistration" to false for all the new tenants created on my platform. How can I do that?

Hi,

The brand color used in metronic is kind of purple color. I want to change to a different shade of purple #5933AA.

What are the suggested steps to do this in a right way? :roll:

It is much easier to write in markdown than this editor :D

Hi,

I have a special case in which I want to completely delete an entity that is marked as ISoftDelete.

I tried this but it does not work:

using (CurrentUnitOfWork.DisableFilter(AbpDataFilters.SoftDelete))
            {
                var tenant = await TenantManager.GetByIdAsync(input.Id);
                await TenantManager.DeleteAsync(tenant);
            }
Showing 41 to 50 of 93 entries