Base solution for your next web application

Activities of "soonjoo"

Answer

hi, thanks for your reply, I have changed that already, however i needed to change npm start to

"start": "ng serve --host 0.0.0.0 --port 4200 -ssl true",

inside package.json and now it works.

Answer

I need help with this too, I have managed to set up for my .net core api, however, I tried but failed at doing it with the angular app. I have enforced https on the API, however, the angular app keeps calling the http version of the API and it gets redirected to the proper https link, but it changes all the POST requests to GET and I can't even authenticate anymore. Very much appreciate if there is https document, since your template already have payment gateway integrated, all of us need SSL.

I am currently using 4.2, and I want to upgrade to 4.5, however, my app is already on production. I did not do any branching previously, how should I upgrade now without affecting the existing data in the database?

is it correct I do it here in the constructor of startup.cs?

public class Startup
    {
        private const string DefaultCorsPolicyName = "localhost";

        private readonly IConfigurationRoot _appConfiguration;

        public Startup(IHostingEnvironment env)
        {
            _appConfiguration = env.GetAppConfiguration();
            Clock.Provider = ClockProviders.Utc;
        }
        ...
        ...
        ...
    }

Hello, may I know specifically where to set the timezone? I read in the docs

You can set Clock.Provider in order to use a different clock provider: Clock.Provider = ClockProviders.Utc; This is generally done at the beginning of an application (proper to do it Application_Start in a web application).

however, I still do not know exactly where to set it. I want the time to be consistent throughout the application, so it always saves as UTC time in the database.

I am using .net core and angular. Thanks.

Question

Hello, I am using .net core + angular aspnetzero template. After I upload my own logo, the logo can't be retrieved back. This is the error in the audit logs

Abp.AbpException: Session.TenantId is null! Possible problems: No user logged in or current logged in user in a host user (TenantId is always null for host users). at Abp.Runtime.Session.AbpSessionExtensions.GetTenantId(IAbpSession session) at CoGen.Arkgene.Web.Controllers.TenantCustomizationController.<GetLogo>d__5.MoveNext() in C:\Users\Justin\Source\Repos\ArkGene\aspnet-core\src\CoGen.Arkgene.Web.Core\Controllers\TenantCustomizationController.cs:line 120 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.<CastToObject>d__381.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.

Getting logo when logged in or logged out doesn't work as well.

Hello, may I know how does Abp get current time zone? I am asking because for my own created entity, it shows 8 hour slower than my time zone, while the entity that asp zero create is 3 hour slower than my time zone... this is when I'm checking the database. My time zone is +8 gmt.

Thank you

I am using .NET Core and Angular, with the .NET Core 1.1 Framework

May I know what did you originally mean?

I decide to skip using settings entirely, and implement the pricing tier on my own. Otherwise I will have 2 things to maintain and i wish to keep things DRY. Like if we decide to change a tier setting values, we need to trace back all the user settings which implemented it and change that too..

However, is there a way I can put it in the client side dynamic scripts?? For example using settings, I can call abp.setting.get("MaxTaskCreationPerMonth"); How would I create one for my tier system?

Thanks.

I was thinking to grant default tenant unlimited access and restrict based on the user settings. For any other tenant I will grant access based on their edition. This way, I won't have to write specific code for just default tenant I think. So I will create 2 tables, called Tiers, and TierSettings. and add one more column into User table binding to Tiers. When user registers inside default tenant, depending on which pricing tier they choose, I will insert the respective settings into their user settings. The checking will be something like

var createdTaskCountInThisMonth = GetCreatedTaskCountInThisMonth();
if (createdTaskCountInThisMonth >= FeatureChecker.GetValue("MaxTaskCreationLimitPerMonth").To<int>()
|| createdTaskCountInThisMonth >= SettingManager.GetSettingValue("MaxTaskCreationLimitPerMonth"))
{
    throw new AbpAuthorizationException("You exceed task creation limit for this month, sorry :(");
}

Is this what you mean when u said to use settings?

Showing 41 to 50 of 59 entries