Base solution for your next web application

Activities of "ellfish"

Hi there,

My tenant logs in from http://[tenancyname].mydomain.com. Their browser receives a cookie for the tenancyname subdomain. Is it possible to override this so they receive a cookie for the parent domain (.mydomain.com)? See example 2 here: <a class="postlink" href="http://www.codeguru.com/csharp/csharp/cs_internet/article.php/c19417/Sharing-Cookies-Across-Domains.htm">http://www.codeguru.com/csharp/csharp/c ... omains.htm</a>

Currently their requests to the parent domain are not authorised because the cookie is only valid for the subdomain.

Thanks!

Ah, ok, that makes sense. Thanks again for getting back to me!

Following up on this in case anyone else has the same problem:

The ApplicationLanguage (stored in the AbpLanguages table) should not be changed from "en" to "en-AU" or similar. I had originally changed this is the AbpLanguages table and in my embedded localization xml file (see original post).

It's a problem because this affects which texts the ABP framework attempts to load from it's own embedded localization files (eg AbpWeb.xml). Because my language was en-AU, no texts were loaded because there were no en-AU xml files, only en files. I noticed this because suddenly the "AreYouSure" text was no longer being localized (via abp.sweet-alert.js).

I know I could compile my own version of ABP with an embedded en-AU file but that's a bit of a maintenance problem for future updates.

Note that it is still safe to override Application_BeginRequest to override the CurrentCulture and CurrentUICulture to en-AU, and this still solves the problem I had.

@hikalkan you might want to think about this, because if someone wants to add another language to Zero it seems the dependencies on abp.localization.abpWeb will prevent localization of those texts.

Thanks for the super speedy response! I basically want to offer my application in en-AU by default and disable language selection because it's too hard to maintain translations.

I didn't realise the cookie was being used to set the culture, thanks for pointing that out. I had tried searching the Zero repo but forgot about the ABP repo.

My problem was that I removed the language select drop-down but the cookie was still set to "en", and without the drop-down there was no way to update the cookie to the new en-AU language. I've resolved it by overriding Application_BeginRequest.

Cheers!

Hi there,

Firstly just wanted to say I'm really enjoying using ASP.NET Zero, it's exactly what I was looking for in a framework. Great job with it!

Within my Zero application I've been trying to set my CurrentCulture to en-AU, primarily for date formatting. I've ensured that both the Windows system region settings and my web.config setting (below) are set to en-AU. I've also verified that other ASP.NET applications on my machine with the same settings are working as expected.

<system.web>
    <globalization culture="en-AU" uiCulture="en-AU" />
</system.web>

I've tried changing my localization .xml file culture as so:

<localizationDictionary culture="en-AU">

But within my Zero app, Thread.CurrentThread.CurrentCulture (and CurrentUICulture) is reporting "en" instead of "en-AU". This is problematic because "en" has the wrong date format for me.

Is this a known problem? Is there any way to force Zero to respect the Web.config globalization setting?

PS I've also found this line which I can hard-code with "en-AU" to localize moment.js client side, but I need server side to be consistent. <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/7f4f765b74c3dd06931b4f8c81e81567071512f1/src/MyCompanyName.AbpZeroTemplate.Web/App/common/views/layout/layout.cshtml#L86">https://github.com/aspnetzero/aspnet-ze ... cshtml#L86</a>

Thanks, Elliot

Showing 1 to 5 of 5 entries