Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "mikatmlvertti"

If you have Migrator project, set production servers connection string to its appsettings and run Migrator project. You might have to set up firewall settings to DB server to allow access for the connection.

Thanks alper, now I got:

Unhandled Exception *: Castle.MicroKernel.ComponentActivator.ComponentActivatorException: ComponentActivator: could not instantiate namespace_replaced.Views.LoginView ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at namespace_replaced.Behaviors.EventHandlerBehavior.b (System.String A_0) [0x00053] in <c7dfb3b24d764a8fad8fbd5300bdb4ed>:0 at namespace_replaced.Behaviors.EventHandlerBehavior.OnAttachedTo (Xamarin.Forms.VisualElement bindable) [0x00010] in <c7dfb3b24d764a8fad8fbd5300bdb4ed>:0 at Xamarin.Forms.Behavior1[T].OnAttachedTo (Xamarin.Forms.BindableObject bindable) [0x00007] in D:\a\1\s\Xamarin.Forms.Core\Interactivity\Behavior.cs:49 at Xamarin.Forms.Behavior.Xamarin.Forms.IAttachedObject.AttachTo (Xamarin.Forms.BindableObject bindable) [0x00027] in D:\a\1\s\Xamarin.Forms.Core\Interactivity\Behavior.cs:23 at Xamarin.Forms.AttachedCollection1[T].InsertItem (System.Int32 index, T item) [0x0002b] in D:\a\1\s\Xamarin.Forms.Core\Interactivity\AttachedCollection.cs:58 at System.Collections.ObjectModel.Collection`1[T].Add (T item) [0x00020] in

and this works without Dotfuscator. I have selected only Mobile.Shared.dll in dotfuscator input.

I have followed those instructions and it builds without errors. When app is started, after splash screen, app crashes. I set dotfuscator to work with debug mode and when LoadApplication(new App()) is being called in MainActivity, it crashes with:

07-26 08:20:43.405 I/MonoDroid( 5690): UNHANDLED EXCEPTION: 07-26 08:20:43.470 I/MonoDroid( 5690): Xamarin.Forms.Xaml.XamlParseException: Position 1:335. Type Runtime not found in xmlns clr-namespace:_livexaml 07-26 08:20:43.470 I/MonoDroid( 5690): at Xamarin.Forms.Xaml.ApplyPropertiesVisitor.GetRealNameAndType (System.Type& elementType, System.String namespaceURI, System.String& localname, Xamarin.Forms.Xaml.HydrationContext context, System.Xml.IXmlLineInfo lineInfo) [0x0004f] in D:\a\1\s\Xamarin.Forms.Xaml\ApplyPropertiesVisitor.cs:263 07-26 08:20:43.470 I/MonoDroid( 5690): at Xamarin.Forms.Xaml.ApplyPropertiesVisitor.SetPropertyValue (System.Object xamlelement, Xamarin.Forms.Xaml.XmlName propertyName, System.Object value, System.Object rootElement, Xamarin.Forms.Xaml.INode node, Xamarin.Forms.Xaml.HydrationContext context, System.Xml.IXmlLineInfo lineInfo) [0x00066] in D:\a\1\s\Xamarin.Forms.Xaml\ApplyPropertiesVisitor.cs:316 07-26 08:20:43.470 I/MonoDroid( 5690): at Xamarin.Forms.Xaml.ApplyPropertiesVisitor.Visit (Xamarin.Forms.Xaml.ValueNode node, Xamarin.Forms.Xaml.INode parentNode) [0x0006a] in D:\a\1\s\Xamarin.Forms.Xaml\ApplyPropertiesVisitor.cs:57 07-26 08:20:43.470 I/MonoDroid( 5690): at Xamarin.Forms.Xaml.ValueNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00000] in D:\a\1\s\Xamarin.Forms.Xaml\XamlNode.cs:86 07-26 08:20:43.470 I/MonoDroid( 5690): at Xamarin.Forms.Xaml.RootNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) [0x00044] in D:\a\1\s\Xamarin.Forms.Xaml\XamlNode.cs:200 07-26 08:20:43.470 I/MonoDroid( 5690): at Xamarin.Forms.Xaml.XamlLoader.Visit (Xamarin.Forms.Xaml.RootNode rootnode, Xamarin.Forms.Xaml.HydrationContext visitorContext) [0x0007b] in D:\a\1\s\Xamarin.Forms.Xaml\XamlLoader.cs:143 07-26 08:20:43.470 I/MonoDroid( 5690): at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.String xaml) [0x00058] in D:\a\1\s\Xamarin.Forms.Xaml\XamlLoader.cs:89 07-26 08:20:43.470 I/MonoDroid( 5690): at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.Type callingType) [0x00026] in D:\a\1\s\Xamarin.Forms.Xaml\XamlLoader.cs:67 07-26 08:20:43.470 I/MonoDroid( 5690): at Xamarin.Forms.Xaml.Extensions.LoadFromXaml[TXaml] (TXaml view, System.Type callingType) [0x00000] in D:\a\1\s\Xamarin.Forms.Xaml\ViewExtensions.cs:36 07-26 08:20:43.470 I/MonoDroid( 5690): at namespacereplaced.App.b () [0x00001] in <5ebdb37f30e141e3a0a4de5211876276>:0 07-26 08:20:43.470 I/MonoDroid( 5690): at namespacereplaced.App.SavePropertiesAsync () [0x00008] in <5ebdb37f30e141e3a0a4de5211876276>:0 07-26 08:20:43.470 I/MonoDroid( 5690): at namespacereplaced.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x0009f] in C:\Projects\uReporting\src\namespacereplaced.Mobile.Droid\MainActivity.cs:51 07-26 08:20:43.470 I/MonoDroid( 5690): at Android.App.Activity.n_OnCreate_Landroid_os_Bundle (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x0000f] in <263adecfa58f4c449f1ff56156d886fd>:0 07-26 08:20:43.470 I/MonoDroid( 5690): at (wrapper dynamic-method) System.Object.899a059f-8de8-419b-85f4-121e56dee9ef(intptr,intptr,intptr) 07-26 08:20:43.489 W/art ( 5690): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable 07-26 08:20:43.493 D/Mono ( 5690): DllImport searching in: '__Internal' ('(null)'). 07-26 08:20:43.493 D/Mono ( 5690): Searching for 'java_interop_jnienv_throw'. 07-26 08:20:43.493 D/Mono ( 5690): Probing 'java_interop_jnienv_throw'. 07-26 08:20:43.494 D/Mono ( 5690): Found as 'java_interop_jnienv_throw'. An unhandled exception occured.

Here are screenshots: [attachment=0:25f52oud]localization_pic2.PNG[/attachment:25f52oud] [attachment=1:25f52oud]localization_pic1.PNG[/attachment:25f52oud]

Startup language seems to follow Host's Default language setting. I changed it to Deutsch and started xamarin app again, it was translated to deutch and even after login with my tenant, language did not change. Tenants default language is finnish and users language is finnish.

Hi Is there a solution for this? I also have same problem. I have fi language selected in Angular UI, but when I loging with xamarin app, language is english. If I change language from settings, it changes but after restarging xamaring app, language is english again.

Also in loginview, sometimes language change doesn't take effect. View is changed, but language remains english.

  1. Start Xamaring app (user is not logged in), Login view is english
  2. Change Language to finnish, works.
  3. Login with my user -> language is english
  4. Logout from app -> Login view, english.
  5. Try to change language to fi, page refresh -> english
  6. Close app and forse stop.
  7. Start app -> english loginview
  8. Change Language to finnish, works.
var usersLanguage = _settingManager.GetSettingValueForUser(LocalizationSettingNames.DefaultLanguage, args.TenantId, userId);

did not return null, it returned string "null" :D

@alper

Your suggestion and

var usersLanguage = _settingManager.GetSettingValueForUser(LocalizationSettingNames.DefaultLanguage, args.TenantId, userId);

worked well but sometimes setting manager returns null.

I tryed to add

if (usersLanguage == null)
                usersLanguage = _settingManager.GetSettingValueForTenant(LocalizationSettingNames.DefaultLanguage, args.TenantId);
if (usersLanguage == null)
                usersLanguage = _settingManager.GetSettingValueForApplication(LocalizationSettingNames.DefaultLanguage);

but these also return null..

How I can get default language, if these fail?

Problem solved with this: There was wrong parameter in appsettings.production.json, WebSiteRootAddress should be ServerRootAddress. After this was changed, it started to work correctly.

If anyone else is going to use Azure and Angular (merged), put {TENANCY_NAME}.yourCustomUrl.end to each setting, and in Azure, make sure Custom domains has *.yourCustomUrl.end and yourCustomUrl.end assigned to the site.

Thank you for your support!

Hi. I send some detail info to your info@aspnetzero.

  1. We set all our server side config data from azures enviromental settings. But for the summarise: App:ClientRootAddress -> https://{TENANCY_NAME}.oursite.net App:WebSiteRootAddress -> https://{TENANCY_NAME}.oursite.net

  2. The request url is same: tenantname.oursite.net

  3. Yes, tenant name is "ABC" and in url it is "abc". We are able to select it when {TENANCY_NAME} is not being used.

Showing 1 to 10 of 42 entries