Base solution for your next web application

Activities of "tteoh"

<cite>ismcagdas: </cite> Hi @tteoh,

Thanks for sharing your findings. Do you use AspNet Zero template ? Normally UnspecifiedClockProvider should be default in the latest version.

Thanks.

Yes. I use AspNet Zero template. The Global.asax is set to use UTC. There is a comment states to remove the line of code if UTC is not required.

/tommy

<cite>ismcagdas: </cite> Hi,

Conversely, whenever user selec the same language as current application/tenant default language, the specified user entry will be removed.

I think related issue is not going to change this behaviour. Do you have a problem specific to this behaviour ?

Thanks.

It's allowing the system to always show the logged in user preferred language once set; otherwise, behave as current, using system default language.

By default configuration, there is always a system default language. If this setting is missing then only fall back for Server's language.

My problem is right now, regardless what language the user has selected, it will be reset at next login or using another device/computer.

Thanks. /tommy

<cite>drcgreece: </cite> Hi Tommy,

Have a look at the following class, it is where the Current Language is being sent to client-side.

<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Web.Common/Web/Localization/LocalizationScriptManager.cs">https://github.com/aspnetboilerplate/as ... Manager.cs</a>

Then, Abp Framework, on each new Http Request it runs this code:

/// <summary>
       /// This method is called by ASP.NET system when a request starts.
       /// </summary>
       protected virtual void Application_BeginRequest(object sender, EventArgs e)
       {
           SetCurrentCulture();
       }

       protected virtual void SetCurrentCulture()
       {
           AbpBootstrapper.IocManager.Using<ICurrentCultureSetter>(cultureSetter => cultureSetter.SetCurrentCulture(Context));
       }

Hence, once the user changes culture/language, the Cookie is changed on the client side + on every new request, that cookie is read and stored inside the :

Thread.CurrentThread.CurrentCulture = new CultureInfo(language);
           Thread.CurrentThread.CurrentUICulture = new CultureInfo(language);

That's how I understand it.

Hopefully, Ismail would comment more given his knowledge and experience in this framework.

Regards

Thank you for pointing out the class that does the "trick". :D

Do you know specifically where the GetScript is being called at client side?

I can't understand the second part on how the Thread at client side is set the latest language selection by users.

Hope you are able to explain more...

Thanks, /tommy

<cite>ismcagdas: </cite> Hi,

I think he is talking about this file <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Web/Views/Layout/_Layout.cshtml">https://github.com/aspnetzero/aspnet-ze ... out.cshtml</a>.

That's correct. The login is still going thru MVC first before switching to SPA.

/tommy

<cite>ismcagdas: </cite> Hi,

It is in our next release v2.1 and I hope it will be out soon probaly in two weeks. Is that ok for you ?

Dear Support,

I would really if you shed light on how the "abp" javascript object is being set during the application startup processing. Especially abp.js, I realized this is where abp.localization properties are set pertaining to languages.

  1. I just couldn't figure out for example, abp.localization.currentLanguage is set. Please kindly advice.

  2. I gathered there is corresponding typescript file, does it have any impact on how these abp is being set?

  3. I realized there are multiple locations that have localization impacts:

  • layout.cshtml (moment, angular, bootstrap, jquery)
  • appSetting.js (i18nServices)

Originally, I was thinking to retrieve User Default Language in appSetting.js and then update header.js (vm.currentLanguage) with newly fetched language setting. Now, it seems there are so many factors to consider.

Lastly, it will be great to add in a new control field (Disable) to AbpLanguages table, which will be used to construct the language list being assigned to abp.localization.languages. This way, it will help to control the language selection in both login screen and dropdown.

This is how productive I had been for the day :oops:

Yes. I look forward to the new release in two weeks.

Thanks. /Tommy

This is related to #3152

Hi Bilal,

Using Role assignment is also an interesting approach that does not require individual assignment. However, if the role is too specific, you may end with too many roles at system administration level.

Definitely, it is a possible alternative. Something I will keep in mind.

Thanks. /Tommy

<cite>ismcagdas: </cite> Hi @drcgreece,

As far as I know, the only way for now is using symbolsource. You can check the details here <a class="postlink" href="http://www.symbolsource.org/Public/Home/VisualStudio">http://www.symbolsource.org/Public/Home/VisualStudio</a>.

Thanks.

Sorry guys, pardon my lack of knowledge on this area. Why would you another debug program when it can be done with VS?

P/s: Ismail, think it will be really useful if you would consider some sort of class diagram for abp, abp zero and aspnet zero. Even if charge a nominal fee, I believe people would pay to shorten the learning curve.

Dear Support,

Current Behavior: Whenever user select a language other than current application/tenant default language, an entry "Abp.Localization.DefaultLanguageName" will be added to AbpSettings table for the specified user.

Conversely, whenever user selec the same language as current application/tenant default language, the specified user entry will be removed.

There is an open issue in github on "user language determination" for AspNet Core but the same issue is encountered for AspNet as well: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/2103#thread-subscription-status">https://github.com/aspnetboilerplate/as ... ion-status</a>

Q1: Will the fix apply include AspNet? Q2: If Yes, when? Q3: Possible to release a patch as I need it for current project?

Thanks, /Tommy

Hi

I would suggest the following approach:

  1. generate temp password when creating the user account with should change password at next login checked
  2. put in mechanism to track if account has been activated. (I extended the AbpUsers table to include a new field named ActivatedOn)
  3. take note users may request email activation if not receiving email from login screen
  4. when activation link is clicked, route the user to Reset Password screen to enter a new password.

Yes, the above involved customising the Account Controlle class file.

/tommy

Showing 151 to 160 of 202 entries