I'm writing a mobile Xamarin Android app that uses a network analysis service (NAS) to find routes.
This is my work environment:
Windows 10 Pro (v. 1809)
Visual Studio 2017 Community with Xamarin
ArcGIS Runtime SDK for .Net (v. 100.4.0; I also tried with v. 100.5.0)
Xamarin.Android... library packages (v. 126.96.36.199; I also tried with v. 188.8.131.52)
ArcGIS Server 10.5
To create a route task I use this code:
System.Uri myNasUri = new System.Uri("http://geoservizi.iuav.it:6080/arcgis/rest/services/network/venezia_network/NAServer/Route");
RouteTask solveRouteTask = await RouteTask.CreateAsync(myNasUri);
When I run the app I catch this error:
Error: Esri.ArcGISRuntime.ArcGISRuntimeException: Internal error: Data type Unknown
at Esri.ArcGISRuntime.Tasks.NetworkAnalysis.RouteTask+<CreateAsync>d__11.MoveNext () [0x0005f] in C:\daily_r\api_xam\dotnet\api\src\Esri.ArcGISRuntime\Esri.ArcGISRuntime.Shared\Tasks\NetworkAnalysis\RouteTask.cs:100
If I use another (more simple) NAS at http://geoservizi.iuav.it:6080/arcgis/rest/services/network/test3_service/NAServer/Route no error occurs.
Moreover, if I load in ArcMap the NAS that causes the error, and then I try to find a route with the Find Route tool, everything works properly.
Any idea what can cause the error?