I am getting a 400 bad request from getting the item from the portal on Xamarin Forms UWP

8111
12
06-28-2018 08:10 AM
PaulFarrow1
New Contributor II

I already have code for Xamarin Forms iOS and Xamarin Forms Android that gets a config file from the ESRI portal and that works for both platforms.  I added the UWP component as we are now going to support UWP and I get a 400 bad request from the item.GetDataAsync() method.  I have already logged in and got a list of portal groups, I can select that group and the portal.createasync method appears to work but when I try to get the item with an id from the getdataasync() method that is when I get the 400 error.

When I put fiddler on the call I see the following error.

<?xml version="1.0" encoding="UTF-8"?>

<Error><Code>InvalidArgument</Code><Message>Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified</Message><ArgumentName>Authorization</ArgumentName><ArgumentValue>Bearer XkcPcpODgq7bMLP3nLURAPrsXtM9gRbRcUaZf_igsXn5xn_5k0JC0TKuJBYkf2gUmvzeU9j7FE1PXYHR--Cr5hyKhf-cRkptCZp6VsTpXxPx6N3ZCXPKVRGoYVnPpPKVpZn71vMOCeuy_6Cn6J_Pxx2UQrwh5w31I0EGopXSPC5bKdLqvSKAEEs_69eDckTQ8Fl4CLGA2YaxfmmPxS5ZD4tKeLc6qUSvakHEEpv_awI1cA7N2FX1-sdpSPIa5BMG</ArgumentValue><RequestId>01BA2DD12883F913</RequestId><HostId>dvHaOQtMJgZzEOytj3oem4DkSFBLWN1mVgaZd39Fh4KTzVMOELkKGKtvG3ccb3g+dC5PnXekL98=</HostId></Error>

Ideas please?  Has any got this going on Xamarin Forms UWP.  I am using the 100.2.1 runtime.

Thanks in advance.

12 Replies
MatthewPierce
New Contributor II

Hi Paul,

Not sure if you're still stuck on this, but I was able to find the handler in 100.2.1: Esri.ArcGISRuntime.Http.ArcGISHttpClientHandler

You do not need to create a new instance, the EventHandler is right on the class itself. Hope that helps!

Matthew

0 Kudos
PaulFarrow1
New Contributor II

Hey Matthew

My bad I think I had some reference issues that made me think this was a problem.  Battled with it again this morning and I can confirm that I have it working also.

Thank you for your help there Matthew and ESRI.

Cheers

Paul

0 Kudos
JenniferNery
Esri Regular Contributor

Good news! This bug has been fixed by Microsoft. Please update your nuget package for `Microsoft.NETCore.UniversalWindowsPlatform` to 6.1.9. 

0 Kudos