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

Activities of "mahendra"

  • What is your product type (Angular or MVC)?
  • Angular
  • What is product framework type (.net framework or .net core)?
  • .net Core

Hi Team, I have following question

  1. How abp load the language text to support multi language. As we have many datasource for language like xml file , abplanguagetext. which function is called to load this. I want to know as i am inserting dynamic text in database. (Check how it is mainting the Language Cache (Reading From XML + Database )) As per my analysis some text is Read from XML and some is Read from DB.

Hi maliming,

We also need to add new text dynamically. Could you please let us know how to refresh the Cache in the Code.

**"Use IRepository<ApplicationLanguageText, long> to dynamically add new text, remember to refresh the cache. **"

HI , Please find the attached json for the entity. We have also attached the line no in screenshot.

Json:

{
  "IsRegenerate": false,
  "MenuPosition": "admin",
  "RelativeNamespace": "OEISListingTemps",
  "EntityName": "OEISListingTemp",
  "EntityNamePlural": "OEISListingTemps",
  "TableName": "OEISListingTemp",
  "PrimaryKeyType": "int",
  "BaseClass": "FullAuditedEntity",
  "EntityHistory": false,
  "AutoMigration": false,
  "UpdateDatabase": false,
  "CreateUserInterface": true,
  "CreateViewOnly": true,
  "CreateExcelExport": true,
  "IsNonModalCRUDPage": false,
  "IsMasterDetailPage": false,
  "PagePermission": {
    "Host": false,
    "Tenant": false
  },
  "Properties": [
    {
      "Name": "Identifier​",
      "Type": "string",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "URI​",
      "Type": "string",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "PlatformVersion​",
      "Type": "string",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "Version",
      "Type": "string",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      }
    },
    {
      "Name": "APIVersion",
      "Type": "string",
      "MaxLength": -1,
      "MinLength": -1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      }
    }
  ],
  "NavigationProperties": [],
  "NavigationPropertyOneToManyTables": [],
  "EnumDefinitions": [],
  "DbContext": null
}
  • What is your product type (Angular or MVC)?
  • Angular
  • What is product framework type (.net framework or .net core)?
  • .net Core Hi ,

We are facing compile time error in angular project while creating the entity using ASPNET zero Tool power tool. Error : **app/admin/oeisListingTemps/oeisListingTemps/oeisListingTemps.component.ts:111:22 - error TS1005: ',' expected. 111 this.urI​Filter, ** Please find attached screen shots for your reference. Note : We are getting this compile time error for few fields like Identifier , URL ,Version etc. Any help would be appreciated ..

Thanks

Answer

Hi,

Any update on my ticket please?

Regards, Mahendra

Answer

Didn't see any option to attch the files....

I am sending an email with attachement requested...

Regards, Mahendra

Answer

Hi ismcagdas,

Please find attach the class file for background job. I am also attaching the appNotifier class (I thought you may require it to see the failure notification).

  • Brief about Background Job Class file

In the Background job, we are essentially importing the master data from excel that user has imported.

Actual import happens in "ImportExcelData" function from where, corresponding master AppService method is called. Once import is done (that is control returned from corresponding master AppService, we are calling "ProcessImportStatus" method.

Inside "ProcessImportStatus" method, conditionally we are sending success notification or failure notification.

Below line is for failure notification.

await _appNotifier.ExcelImportStatus(args.User, file.FileToken, file.FileType, file.FileName);

and below line is for success notification.

await _appNotifier.SendMessageAsync(
                            args.User,
                            "Data Imported Successfully :" + args.ExcelFileName,
                            //_localizationSource.GetString("SuccessfullyImportedFromExcel"),
                            Abp.Notifications.NotificationSeverity.Success);

Answer

Hi Expert,

Any thought on my above query...

Regards, Mahendra

Question

Hi,

Similar to User Import that you have in ASPNetZero, we have created one more import to import masters data. We are using ASPNetZero Background Job for import. Once the job is finished execution, we are sending notification to the user.

Simple Message


If the import is initiated by the admin user of tenant, the notification comes and all seems ok. But, if I create one more user for the tenant and then initiate the process of import, the notification never comes up.

Pub/Sub


The above issue is occuring for pub/sub type of message as well. I mean in case of pub/sub also, only admin user of tenant is getting the notification and not the other user. I checked, both the user has subscribed for the notification

But surprisingly, in case of pub/sub, if I don't specify the user (something like below), then both the user gets the notification. await _notificationPublisher.PublishAsync(AppNotificationNames.ExcelImportStatus, notificationData);

But if I specify the user (the other user than the admin of the tenant)(something like below), then this user does not get notification await _notificationPublisher.PublishAsync(AppNotificationNames.ExcelImportStatus, notificationData, userIds: new[] { argsUser });

and if I specify the user (i.e. admin of the tenant)(something like below), then this user does get notification await _notificationPublisher.PublishAsync(AppNotificationNames.ExcelImportStatus, notificationData, userIds: new[] { argsUser });

During my debugging, I could see that notification data are getting inserted in AbpTenantNotifications and AbpUserNotifications tables. But below code of front end does not trigger (in case of user other than the admin. In case of admin it triggers).

abp.event.on('abp.notifications.received', userNotification => { debugger; self._zone.run(() => { onNotificationReceived(userNotification); }); });

The question is why the other user is not getting the notification (either Simple or pub/sub), if the notification is targetted to a specific user.

Regards, Mahendra

Answer

Hi,

We did two things:

  1. Didn't use Azure's CORS settings. See the screen shot below.

  1. Set the following in App:CorsOrigins settings. Here sequence matters. https://<mydomain>.net, https://*.<mydomain>.net

Regards, Mahendra

Showing 101 to 110 of 203 entries