Base solution for your next web application

Activities of "BobIngham"

dotnet Core Angular v.5.1.0 RAD tool For those of us who implement our own module in the Angular project it may be worth pointing out to your users the dependencies required from generated code:

import { DataTableModule, FileUploadModule, AutoCompleteModule, PaginatorModule, EditorModule, InputMaskModule, TooltipModule } from 'primeng/primeng';
import { ModalModule, TabsModule } from 'ngx-bootstrap';

Please add to your documentation, it may save some peeps a lot of time.

dotnet Core, Angular, v5.1.0 I copy ProjectName.Core\Localization\ProjectName\ProjectName.xml and paste to ProjectName.Core\Localization\ProjectName\ProjectName-en-GB.xml and change the localization dictionary to en-GB at the head:

<localizationDictionary culture="en-GB">

I open ProjectName.EntityFrameworkCore\Migrations\Seed\Host\DefaultLanguagesCreator.cs and add the following line to the list of ApplicationLanguages:

new ApplicationLanguage(tenantId, "en-GB", "English", "famfamfam-flags england"),

I open ProjectName.EntityFrameworkCore\Migrations\Seed\Host\DefaultSettingsCreator.cs and modify the default language:

AddSettingIfNotExists(LocalizationSettingNames.DefaultLanguage, "en-GB");

I run the project and sign in as host and get the following: [attachment=0:fy2tp2gv]DefaultLanguages.PNG[/attachment:fy2tp2gv]

What am I doing wrong?

Question

.Net Core, Angular I have searched source code to no avail to find out usage of the settings definitions:

new SettingDefinition(
    name: NuageSettings.NuageTenantManagement.RegistrationCode,
    defaultValue: null,
    scopes: SettingScopes.Tenant,
    displayName: null,
    description: null,
    group: null,
    isVisibleToClients: true,
    isInherited: true,
    customData: null),

I have carefully read the documentation at https://aspnetboilerplate.com/Pages/Documents/Setting-Management but the following explanation gives me only reason to scratch my head: Name (required): A setting must have a system-wide unique name. It's a good idea to define a const string for a setting name instead of using a magic string. Default value: A setting may have a default value. This value can be null or an empty string. Scopes: A setting should define it's scope (see below). Display name: A localizable string that can be used to show setting's name later in the UI. Description: A localizable string that can be used to show a setting's description later in the UI. Group: Can be used to group settings. This is just for the UI, and not used in setting management. IsVisibleToClients: Set true to make a setting usable on the client-side. isInherited: Used to set if this setting is inherited by tenant and users (See setting scope section). customData: Can be used to set custom data for this setting definition. My question is:

Is there anywhere i can find examples of implementation of these properties, in particular displayName, description, group, isInherited and customData???

.Net Core, Angular v5.1.0 I love the idea of the new Entity change history functionality offered in 5.1.0 and wanted to test before upgrading my current project. I download and create a new project. I add a new entity using the new RAD tool - GREAT JOB GUYS - and disable the Add migration and Update database options so I can carry out some final modifications before migrating to the database::

[Table("NcPerson")]
[Audited]
public class Person : FullAuditedEntity<Guid>, IMustHaveTenant, IMayHaveOrganizationUnit, IExtendableObject
{
    public int TenantId { get; set; }

    public long? OrganizationUnitId { get; set; }

    [Required]
    [StringLength(PersonConsts.MaxSalutationLength, MinimumLength = PersonConsts.MinSalutationLength)]
    public virtual string Salutation { get; set; }

    public string ExtensionData { get; set; }
}

I then migrate to the database. I modify my CoreModule.PreInitialize() method with the following lines:

Configuration.EntityHistory.IsEnabled = true;

Configuration.EntityHistory.Selectors.Add(
    new NamedTypeSelector(
    "Abp.FullAuditedEntities",
    type => typeof(IFullAudited).IsAssignableFrom(type)
));

I compile and run the project successfully. I add several people and update and delete one person. I have no data in my AbpEntityChangeSets table or associated tables. I started without the [Audited] attribute on my entity and without the line Configuration.EntityHistory.IsEnabled = true; (both of which should be unnecessary according to the documentation at [https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/doc/WebSite/Entity-History.md]). What am I doing wrong?

.Net Core, Angular v5.1.0 implemented Feature #718 Entity change history which is fully documented at [https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/doc/WebSite/Entity-History.md]). In order to test this feature I have downloaded and created a new project. My question is:

where is the change history persisted?

I can see no table in the database which stores this information.

Is there any way to disable the unique and required values from the email property in the user by tenant filter? Why is it there, surely uniqueness by user username and password by tenant is sufficient? If they are not required, how do I remove them?

.Net Core, Angular 5.0.2 I am trying to return UserFriendlyException errors to app written using Ionic 3. I can sign up and find a tenant using a (unique) voucher code, return the tenantId to the app and add this to the sign in process which gives me the correct tenantId as a claim in the JWT. To return data to the app I have implemented the [DontWrapResult] attribute which works well. However, I can not find a way to return well formatted errors to the app using the UserFriendlyException constructor. For example, I am trying to implement UserFriendlyException to indicate that a username is already taken (as per the standard system). The error received at the app has a status of 0 and a statusText of "Unknown error". I have tried implementing [DontWrapResult(WrapOnError = false)] but I am still getting the same results. The question is: How to return UserFriendlyException to the app in a manner which can be read in the app?

Zero 5.0.2 - Aspnet Core, Angular I have an app written using Ionic. The user registers with the app using a username, password and voucher code. The voucher code is unique to a given tenant. The registration process injects the tenantId into a unit of work using statement, ABPSession.TenantId is set with AbpSession.Use(tenantId, null) for the uow and a new user is created for the tenant. The tenantId is returned to the app and saved in a local database. The app user is redirected to the login page to login. How do I pass the username, password and tenantId (from device storage) from the app to the server and have the server log the user into the correct tenant? Surely I do not have to set filters in unit of work and apply AbpSession.Use(tenantId, null) for every call my app makes to the server?

Question

I have added my own setting provider with a tenant scope and added it to the preinitialize method of my module. I set these settings in

TenantRegistrationAppService.RegisterTenant

and I can modify them by adding a tab to

tenant.settings.component.html

and adding code to

TenantSettingsAppService.UpdateAllSettings

So far so good. One of these settings is a voucher code which must be unique as it will be used by an app to register with the system and the voucher code will find the tenant using unique voucher code setting. How do search for all settings given a unique name (App.NuageTenantManagement.VoucherCode) to ensure a modified value is unique and how do I find a tenant from the same unique voucher code setting?

Question

My solution is Angular with .NET Core. I would like to add html tags to my localization string. I have noticed that the localization string "ChatUserSearch_Hint" does exactly this:

<text name="ChatUserSearch_Hint">
    <![CDATA[
      Write only username for same tenant users, <br>
      <strong>[tenancyName]\[userName]</strong> for other tenant's users <br><br>
      for example: <br>
      .\admin -> for host admin <br>
      Test\admin -> for test tenant's admin <br>
      admin -> for your tenant's admin
    ]]>
</text>

though I have been unable to display this string in the UI. The string will be displayed in a modal designed to help users setting up a new tenant and at the moment the text is displayed along with the embedded html tags. In an MVC solution I could use @Html.Raw but this is an Angular solution with .NET Core. Any pointers anyone?

Showing 131 to 140 of 142 entries