hello team,
For this new update of ANZ v5, I notice that the DTOs don't use attributes for auto mapping anymore.. instead, all are declared in CustomDtoMapper.
May I know the reason, and should we still continue using auto mapping via attributes or change all mapping definitions to follow your practise and declare inside CustomDtoMapper? Thank you.
thank you, looking forward to that!
hello,
here is the response that I get.
"�\b\0\0\0\0\0\0�\aI�%&/m�{J�J��t�\b�
$ؐ@������iG#)���eVe]f@�흼��{���{���;�N'���?\fdl��J�ɞ!���?~|?"~�Guެ���G���u������G�>�f�b���f]w>A��G�"+��ٌ�5���s��g�͗ٲO�5\��yQ�/�i����G���}T�o{�d�4���Z;z�\b�"�>(����_Ϩ�7�+j&�M�M[-N��5k֓fZ�������ӬͿj��ۢ9[����|��EE/�ge��0g^\0z��Y��A�u�-gY=#tZ��4�>���\0\T�v^^���)5�ϲ�rM=�ͷ��y\u07b4����^S�E�Ω��E\b���u��՛�q���}���p{����ޣ{���|�w��a�ʮ����\bmvB*��\t����jY���1 ����ݽ���|�ժ,��������x\a�Q�:/���}���w��w���������=?������';;�v��9uN�B\��?z]\,��N�/�%�g��y�U]6�错Ph��uE\-߭���v^���٫����\nk�����g����K��m�6\0\0"
not sure why its like that, any idea??
Hello, I had managed to do it, I needed to inherit IXamarinView inside my BarcodeSearchView class.. now the page loads properly.
Thanks!
Hello team,
I am very new to Xamarin and want to test it out on your framework. I am trying to create a simple page.. I managed to show out the link on the side menu, however clicking on the link does nothing. May I know which steps I have missed out?
First I added a new content page to in Mobile.Shared Views Folder
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Name="BarcodeSearchPage"
x:Class="MyCompany.MyProject.Views.BarcodeSearchView"
xmlns:behaviors="clr-namespace:MyCompany.MyProject.Behaviors;assembly=MyCompany.MyProject.Mobile.Shared"
xmlns:base="clr-namespace:MyCompany.MyProject.ViewModels.Base;assembly=MyCompany.MyProject.Mobile.Shared"
xmlns:controls="clr-namespace:MyCompany.MyProject.Controls;assembly=MyCompany.MyProject.Mobile.Shared"
xmlns:image="clr-namespace:ImageCircle.Forms.Plugin.Abstractions;assembly=ImageCircle.Forms.Plugin.Abstractions"
xmlns:extensions="clr-namespace:MyCompany.MyProject.Extensions.MarkupExtensions;assembly=MyCompany.MyProject.Mobile.Shared"
xmlns:permission="clr-namespace:MyCompany.MyProject.Services.Permission;assembly=MyCompany.MyProject.Mobile.Shared"
base:ViewManager.AutoWireViewModel="true"
Title="{Binding Title}">
<ContentPage.Content>
<StackLayout>
<Label Text="Welcome to Xamarin.Forms!"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand" />
</StackLayout>
</ContentPage.Content>
<ContentPage.Behaviors>
<behaviors:EventHandlerBehavior EventName="Appearing">
<behaviors:InvokeCommandAction Command="{Binding PageAppearingCommand}" />
</behaviors:EventHandlerBehavior>
</ContentPage.Behaviors>
</ContentPage>
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class BarcodeSearchView : ContentPage
{
public BarcodeSearchView ()
{
InitializeComponent ();
}
}
Then I added a new file in Mobile.Shared ViewModels Folder
public class BarcodeSearchViewModel : XamarinViewModel
{
public string Title => L.Localize("Barcode Search");
public BarcodeSearchViewModel()
{
}
}
Then I added a new Navigation Menu Item
private readonly ObservableRangeCollection<NavigationMenuItem> _menuItems = new ObservableRangeCollection<NavigationMenuItem>
{
new NavigationMenuItem
{
Title = L.Localize("Tenants"),
Icon = "Tenants.png",
ViewType = typeof(TenantsView),
RequiredPermissionName = PermissionKey.Tenants,
},
new NavigationMenuItem
{
Title = L.Localize("Users"),
Icon = "UserList.png",
ViewType = typeof(UsersView),
RequiredPermissionName = PermissionKey.Users,
},
new NavigationMenuItem
{
Title = "Search Barcodes",
Icon = "UserList.png",
ViewType = typeof(BarcodeSearchView),
}
/*This is a sample menu item to guide how to add a new item.
,new NavigationMenuItem
{
Title = "Sample View",
Icon = "MyIcon.png",
TargetType = typeof(_SampleView),
Order = 10
}
*/
};
What steps did I miss out so I can navigate to my page? Thank you.
Hello again,
I didnt know i could step inside that call. So i had debug it, and found it had caught this exception message:
{Flurl.Http.FlurlHttpException: GET <a class="postlink" href="http://myprojectdev.azurewebsites.net/api/services/app/Session/GetCurrentLoginInformations">http://myprojectdev.azurewebsites.net/a ... formations</a> failed. Unexpected character encountered while parsing value: . Path '', line 0, position 0. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: . Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue () [0x002b3] in <c19705166c7c4a608e182e859c4de6d2>:0 at Newtonsoft.Json.JsonTextReader.Read () [0x0004c] in <c19705166c7c4a608e182e859c4de6d2>:0 at Newtonsoft.Json.JsonReader.ReadAndMoveToContent () [0x00000] in <c19705166c7c4a608e182e859c4de6d2>:0 at Newtonsoft.Json.JsonReader.ReadForType (Newtonsoft.Json.Serialization.JsonContract contract, System.Boolean hasConverter) [0x00043] in <c19705166c7c4a608e182e859c4de6d2>:0 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x000db] in <c19705166c7c4a608e182e859c4de6d2>:0 at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00053] in <c19705166c7c4a608e182e859c4de6d2>:0 at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in <c19705166c7c4a608e182e859c4de6d2>:0 at Newtonsoft.Json.JsonSerializer.Deserialize[T] (Newtonsoft.Json.JsonReader reader) [0x00000] in <c19705166c7c4a608e182e859c4de6d2>:0 at Flurl.Http.Configuration.NewtonsoftJsonSerializer.Deserialize[T] (System.IO.Stream stream) [0x00019] in <f0b4fb8d1d61489486317325ace33652>:0 at Flurl.Http.HttpResponseMessageExtensions+<ReceiveJson>d__0
1[T].MoveNext () [0x00121] in <f0b4fb8d1d61489486317325ace33652>:0 --- End of inner exception stack trace --- at Flurl.Http.HttpResponseMessageExtensions+<ReceiveJson>d__0
1[T].MoveNext () [0x00157] in <f0b4fb8d1d61489486317325ace33652>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at MyCompany.MyProject.ApiClient.AbpApiClient+<GetAsync>d__25
1[T].MoveNext () [0x0007e] in C:\Users\Justin\Source\Repos\MyProject\src\MyCompany.MyProject.Application.Client\ApiClient\AbpApiClient.cs:183 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at MyCompany.MyProject.ApiClient.AbpApiClient+<GetAsync>d__24
1[T].MoveNext () [0x000c6] in C:\Users\Justin\Source\Repos\MyProject\src\MyCompany.MyProject.Application.Client\ApiClient\AbpApiClient.cs:172 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at MyCompany.MyProject.ApiClient.AbpApiClient+<GetAsync>d__22
1[T].MoveNext () [0x00027] in C:\Users\Justin\Source\Repos\MyProject\src\MyCompany.MyProject.Application.Client\ApiClient\AbpApiClient.cs:156 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at MyCompany.MyProject.Sessions.ProxySessionAppService+<GetCurrentLoginInformations>d__0.MoveNext () [0x00035] in C:\Users\Justin\Source\Repos\MyProject\src\MyCompany.MyProject.Application.Client\Sessions\ProxySessionAppService.cs:10 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter
1[TResult].GetResult () [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at MyCompany.MyProject.ViewModels.LoginViewModel+<<SetCurrentUserInfoAsync>b__48_0>d.MoveNext () [0x00024] in C:\Users\Justin\Source\Repos\MyProject\src\MyCompany.MyProject.Mobile.Shared\ViewModels\LoginViewModel.cs:256 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <896ad1d315ca4ba7b117efb8dacaedcf>:0 at MyCompany.MyProject.Core.Threading.WebRequestExecuter+<Execute>d__0
1[TResult].MoveNext () [0x002a1] in C:\Users\Justin\Source\Repos\MyProject\src\MyCompany.MyProject.Mobile.Shared\Core\Threading\WebRequestExecuter.cs:52 }
hello again, i forgot to mention previously i directly pointed to the development api service (online not localhost). And it manages to call GetAll for User configurations and Authenticate, then keeps dying at GetCurrentLoginInformations...
so i tried localhost, but running the start-host.bat provided, and it manages to run successfully, for everything
on the development api service online, the url is formed correctly when i look inside httpResponse variable, and paste the url into my browser it works, but it immediately dies on the await httpResponse.GetJsonAsync<AjaxResponse<T>>(); line
thank you.
hello team,
I am having issue running the android app. using version 5.04 jquery + aspnet core. I connect my phone via wifi to debug. After the splash screen, I am prompted to log in. however, everything I do shows that returns the "A problem occurred while trying to communicate with the server. Do you want to try again?" error. Checking my database audit logs, the methods are called successfully without any exception. the call dies here:
in Application.Client.ApiClient.AbpApiClient
public async Task<T> GetAsync<T>(string endpoint, object queryParameters, string accessToken, bool stripAjaxResponseWrapper)
{
var httpResponse = GetClient(accessToken)
.Request(endpoint)
.SetQueryParams(queryParameters);
if (stripAjaxResponseWrapper)
{
var response = await httpResponse.GetJsonAsync<AjaxResponse<T>>(); // < ------ DIES AFTER THIS LINE
ValidateAbpResponse(response);
return response.Result;
}
return await httpResponse.GetJsonAsync<T>();
}
any help is much appreciated. Thank you.
Thank you for your help, I will try the first method, the second method seems hard, I'm not sure how to store the next code in cache, because the next code is not always in a sequence as it might be under a different parent