Base solution for your next web application

Activities of "razkhan78"

Question

Aspnetzero performance is really slow specially loading following script in our development environments ../AbpScripts/GetScripts?v=636624440372804936

Takes 12-20 secs. Its very painful to wait for this script on every page load. Please help. Its even slow for pages without any db call. We are using latest version asp.net core/jquery

Thanks Raza

We are getting console errors for MIME type and cookie consent, getting these errors from original project we downloaded (asp.net core2.1 and jQuery)

MIME type error we are getting on our local IIS as well as on azure server, please let us know if we need to do any specific settings and for cookieconsent as per shown in below image window.cookieconsent object is null, , please let us know if we need add any specific js for it.

AbpNotificationSubscriptions table is having "EntityId" and "EntityTypeName" columns. We have implemented Notification when any user add data in our custom table X. We have also set Entity Type in AppNotificationProvider.cs file as "typeof(X)". Our notifications are being displayed on Notification Settings page.

In our case, when user subscribes for notification, EntityId and EntityType saved as NULL in database.
When notification is published, that time also EntityId and EntityType saved as NULL in database.

Following are our questions for Insert operation notification:

  1. For our case, these types of Notification can be called General or Entity based?
  2. For insert operation, EntityTypeName should be saved in "AbpNotificationSubsciptions" table or not?
  3. For insert operation, EntityTypeName and EntityId should be saved in "AbpTenantNotifications" table or not?

We are implementing Notifications for Create events as well some of update data event.

We have one table called "Document". We have implemented Notifications for following cases with specific tenant:

  1. When user creates new document.
  2. When user changes Document type

In Notification setting, two entries will be displayed with checkboxes:

  1. On New Document creation
  2. On Document type change

Issue:

Case 1(Working): If we subscribe for "On New Document creation" and "On Document type change" everything works fine and both types of notifications will be sent to subscribed users. Case 2(Working): If we subscribe only for "On New Document creation" everything works fine and notification will be sent to subscribed users only for new document creation. Case 3(Not Working): If we subscribe only for "On Document type change" and NOT SUBSCRIBE for "On New Document creation" then notification will not be sent to subscribed users. Case 4(Not Working): If we subscribe only for "On New Document creation" and NOT SUBSCRIBE for "On Document type change" then also notification will be sent for both events. If we remove subscription for "On New Document creation" then only "On Document type change" event notification won't be sent.

For all cases, AbpNotificationSubscription table is populated perfectly as per notification selection from Setting screen. Issue occures only with sending notifications.

We are calling PublishAsync as per following: await _notificationPublisher.PublishAsync("App.NewDocumentCreated", notificationData, null,NotificationSeverity.Info, null, excludedUserIds: new[] { createdByUser.ToUserIdentifier() });

As per our understanding, this method will only send notifications to subscribed users which is not working in our system.

It seems like data update Notification subscription is dependent on data create notification. Please suggest how we can solve these issues.

public class AppNavigationProvider : NavigationProvider
    {
        public const string MenuName = "App";
        public const string MenuTopName = "AppTop";

        private readonly IAbpSession session;

        public AppNavigationProvider(IAbpSession session)
        {
            session = session;
        }
public override void SetNavigation(INavigationProviderContext context)
        {
            var menu = context.Manager.Menus[MenuName] = new MenuDefinition(MenuName, new FixedLocalizableString("Main Menu"));
            menu
                .AddItem(new MenuItemDefinition(
                        AppPageNames.Host.Dashboard,
                        L("Dashboard"),
                        url: "App/HostDashboard",
                        icon: "flaticon-line-graph",
                        requiredPermissionName: AppPermissions.PagesAdministrationHostDashboard,
                        featureDependency: new SimpleFeatureDependency(true, AppFeatures.EnableTracking),
                        isVisible: (session.MultiTenancySide != MultiTenancySides.Host)
                    )
    }
    }
public override void PreInitialize()
        {
            Configuration.Navigation.Providers.Add<AppNavigationProvider>();
        }

We are working on creation of menu dynamically. in MenuItemDefinition there is property isVisible that show/hide menu in the web app we have use session based condition in that.

Our problem is that , when app is started this menu is register using PreInitialize() method. when it goes to AppNavigationProvider class , session value is (session.MultiTenancySide = "Host") because session is null when app is startup. on that bases whole menu item's visible property is set to false , and that menu will not shown to any user, either user is host user or tenant user

Surprisingly featureDependency works dynamically for every user.

could you please help me to solve this issue?

Thanks

We have enable multi-tenancy in our application. In our application we need to display logo(custom logo uploaded by Tenant) on header as well as on some other pages. We have checked that there is one method "GetLogo()" in TenantCustomizationController. This controller exists in Web.Core project.

In "GetLogo()" method, tenantId is retrieved from AbpSession.GetTenantId(). And this tenantId will be passed to database for getting Image bytes from AbpBinaryObjects table. But in our system, we are getting AbpSession.GetTenantId()= null so logo (uploaded by Tenant) is not being displayed.

We are calling HeaderViewModel method "GetLogoUrl" which calls "GetLogo" from TenantCustomizationController. We are getting all values in LoginInformations.Tenant but not in TenantCustomizationController.

Please let us know how should we resolve this.

We have 2 DB on a local server and on the live server.

We have one method that fetches data based on primary key id from "Risks" table.

var riskDetail =  _riskRepository.Get(input.Id??0);

It gives me an error when I run on live server with live db but it is working on local server with local db I have checked live server's DB schema is same, a table is there and data is also there in the table, still, it is giving this error.

Hello we are using asp.net core2.1 and jQuery. We have used datatable in many of our pages and facing strange issue of lost css of datatable.min.css. see attached.

Below are the cases when we are seeing issue. Case 1: 1)Open page - datatable is fine 2)Hit F5 or click reload button on chrome - doing this 2nd or 3rd time causing css issue on pagination , suddenly appears searchbox and paging dropdown gets to the top. 3)If after seeing issue if again do reload it gets back to normal.

Case 2: 1)Open page 2) Go to different page from menu 3)Come back to same page from menu link and issue occurs( css issue on pagination , suddenly appears searchbox and paging dropdown gets to the top) & then only if you do ctrl+F5 then it seems to be gone.

Please let us know on this if it has something to do wih version of datatable.

Hello

We are using Feature Edition in our system. And we have started getting this error "FeatureChecker can not get a feature value by name. TenantId is not set in the IAbpSession!".

We are suspecting that this is sometimes happening when in browser we don't have tenant selected. It seems to be some internal code.

So please let us know how we can get solution on this?

Hello , I am working with boilerplate front-end is Jquery and backed is .Net core . In that for Host user there email setting option available. I have added my sendgrid SMTP credentials but for host user email is not sending.

I have no idea why it is behaving like this. all the host user confifuration is reading in __emailsender object but email is not going

Showing 1 to 10 of 44 entries