Base solution for your next web application

Activities of "piapps"

I am having a similar problem in Azure, my local works fine, but on the production server the language switch is not being obeyed. Doesnt matter what I click it will not change language, the request header looks correct and when a cookie does appear (i have deleted them a few times to see if it helps) it also looks correct.

The application is still sending different text back though, i even disabled all but two languages and changed the culture code on the 2nd language (that was always being selected) to something else so it would hopefully pick the default of the tenant, it however still picks the wrong language.

Checking the db table settings gives me various results and im not sure what is actually supposed to be in there, whenever I pick the language of the default tenant I am getting no record in there. Other times there is a null value in there, niether seems correct to my eyes but that doesnt mean its wrong if it was basing on the tenant default then that would be acceptable. I am starting to think maybe the culture header is being stripped from my requests and thus being ignored but I can not find any documentation to support that claim by Azure.

Anyone got any ideas?

I think I have it resolved but am just getting it retested by client at moment, i had set everything to default to English (Australia) which is required, but it wouldnt select the language no matter what we did. However I read somewhere else (cant remember where) that someone had to create a en-AU.xml file and thats what i have done and it does seem to work now.

I am not 100% sure why that helps but i will keep you posted if it fixed the issue or not

Hi guys,

So I am in the process of trying to create a UWP project in the mobile solution, everything compiles when it runs I am getting a null exception at line 56 of LoginViewModel in Mobile.Shared\ViewModels\LoginViewModel

It appears everything under applicationContext is null (applicationContext.Configuration etc), i have a feeling that maybe the DI is not working correctly or something like that but I am having trouble trying to see exactly what is wrong

My UWP is just a blank UWP that I have added a Locale.cs to (to match the other mobile projects), then added references to Application.Client Application.Shared Core.Shared Mobile.Shared

It wouldnt compile without all 4 even though only 2 are needed, also has Flurl and Flurl.Http, Xamarin.Forms (same versions as the other projects) The MainPage.xaml.cs has this.LoadApplication(new App()); added to the ctor and inheritance to Page removed from the class while WindowsPage was added to the xaml markup App.xaml.cs has had the following added to the OnLaunched event

ApplicationBootstrapper.InitializeIfNeeds<NAMESPACEXamarinUWPModule>();

AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException; TaskScheduler.UnobservedTaskException += TaskSchedulerOnUnobservedTaskException;

base.OnLaunched(e); //Xamarin.Forms.Forms.Init(e); global::Xamarin.Forms.Forms.Init(e);

ImageCircleRenderer.Init(); CachedImageRenderer.Init();

ConfigureFlurlHttp();

and the App.xaml.cs inherits from Windows.UI.Xaml.Application

So I think either the App.xaml is inherting maybe from the wrong thing or OnLaunched might be wrong event perhaps or I need more references in the project to fix up the applicationContext null thing but im not really sure can anyone help?

Regards, Pete

Hi alper,

Yes I did see that post and used it to piece together some of the requirements to get the UWP project started. My problem is related to appContext being null when trying to load the LoginViewModel. I cant see how it relates to AsyncCommand at all?

I believe that appContext is being resolved before its properties are assigned

Regards, Pete

Hi alper,

Yep already created the module and I figured out the issue, it was that the UserConfigurationManager needs to actually be called to intialise the app context before any view model or anything using app context is called. It is done in droid in the SplashActivity but for iOS in the main shared project App.xaml.cs. I added a clause for UWP in the App.xaml.cs of the shared project too and it resolves the properties as expected.

There are other issues in the UWP project in relation to look and design but at least it runs so now I can focus on that.

Appreciate the help too thanks

Showing 21 to 25 of 25 entries