Base solution for your next web application

Activities of "rferrari"

Hi,

in my project in spite the fact that self registration is disabled in the tenant setting, CREATE ACCOUNT and EMAIL ACTIVATION links are still present in login form.

Could you advise?

Thanks

Thanks I will work on this base.

I also followed your indication on how to remove front end application and now each time I change language I have to log in again. Is that related to your indication? Thanks in advance

OK I reviewed the code. Of course before login I cannot know the tenant but for subdomain url. If that is not implemented there is no way to know the tenant before login. As user registration and email activation are tenant settings they cannot be detected before login in this case.

Do you have any hint for the other issue I mentioned? Thanks

I am ok with the indication for self registration and the use of subdomain.

The other issue is related to the removal of front line application. I close this issue and open another one.

Thanks

Hi,

I followed the indications to remove the front end application provided in this post:

[http://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=5058&hilit=front+end])

That is:

You need to delete HomeController, AboutController and TenantRegistrationController under Controllers folder of MVC project. You also need to remove their *.cshtml files as well.

You also need to change your default route to Account/Login page.

That said the application is correctly rerouting to the login page. My question is if there is a way to reroute to the current angular state and not been logged out.

I am using ASP.NET MVC 5.x & Angularjs 1.x last version.

Thanks

Sorry, totally silly question as it was written.

The point is about changing language.

When you have front end application and you change language you are redirected to home page, but you are still logged in.

When you remove front end application and you reroute on login page in RouteConfig.cs, if you cahnge language you are sent to the login page.

Is there a way to be rerouted to the current page after language change?

Thanks

Ok in reality vm.changeLanguage in header.js is producing the correct url:

/AbpLocalization/ChangeCulture?cultureName=it&returnUrl=http://localhost:6240/Application#/tenant/activities

I am missing something in my solution...

so the issue is that the vm.changeLanguage produce the right url:

/AbpLocalization/ChangeCulture?cultureName=it&returnUrl=http://localhost:6240/Application#/tenant/organizations

but the get request is truncated after the # sign:

http://localhost:6240/AbpLocalization/ChangeCulture?cultureName=en&returnUrl=http://localhost:6240/Application

this happens both in Chrome and Edge,

can you advise?

Thanks

This has nothing to do with removing front end application by the way

Hi, well I did it myself

The original vm.changeLanguage in header.js used by SPA has a single instruction:

window.location.href = abp.appPath + 'AbpLocalization/ChangeCulture?cultureName=' 
                     + languageName + '&returnUrl=' + window.location.href;

for what I see AbpLocalization/ChangeCulture is an MVC controller in Abp.Web.Mvc and cannot work inside a SPA. Indeed the return URL is broken at the #.

I replaced it with the following, this changes the value of the language cookie and reload. As the previous does in MPA.

vm.changeLanguage = function (languageName) {
       document.cookie = "Abp.Localization.CultureName="+languageName;
       location.reload()
};

In this way I change language and remain on the page.

Best regards

Showing 21 to 30 of 38 entries