<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ArcGISHttpClientHandler is obsolete: way to disable PreAuthenticate with ArcGISHttpMessageHandler? in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1328737#M12106</link>
    <description>&lt;P&gt;Make sure you configure your oauth app settings in the portal to have a redirect url that matches what you have in the application. If there's a mismatch, you get the error you report.&lt;BR /&gt;&lt;BR /&gt;If possible, any chance you could share something that reproduces the hang? Also where do you see the hang?&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2023 15:44:10 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2023-09-14T15:44:10Z</dc:date>
    <item>
      <title>ArcGISHttpClientHandler is obsolete: way to disable PreAuthenticate with ArcGISHttpMessageHandler?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1327525#M12099</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm upgrading an app from Xamarin Forms/ArcGIS Runtime 100.15 to Maui/Maps SDK 200.0.&lt;BR /&gt;&lt;BR /&gt;We're using&amp;nbsp;ArcGISHttp&lt;STRONG&gt;C&lt;/STRONG&gt;lientHandler, and see that it is now marked as obsolete and we're supposed to use&amp;nbsp;ArcGISHttp&lt;STRONG&gt;M&lt;/STRONG&gt;essageHandler instead. Unfortunately, it seems like we need to be able to set ArcGISHttp&lt;STRONG&gt;C&lt;/STRONG&gt;lientHandler.PreAuthenticate to false in order to support IWA on Android. If we do not set this value then the app hangs when trying to make a request to services in a portal secured with IWA.&lt;BR /&gt;When I tried to switch over to using&amp;nbsp;ArcGISHttp&lt;STRONG&gt;M&lt;/STRONG&gt;essageHandler, this property isn't available on the handler, and I get the same hanging behaviour.&lt;BR /&gt;I have set&amp;nbsp;credential.PreAuthenticateBehavior = PreAuthenticateBehavior.Disabled on the ArcGISNetworkCredential that we create for IWA but that doesn't help.&lt;BR /&gt;&lt;BR /&gt;There are also a couple other properties we use on ArcGISHttpClientHandler: Credentials,&amp;nbsp;UseDefaultCredentials and&amp;nbsp;ServerCertificateCustomValidationCallback, which are also absent from the new&amp;nbsp;ArcGISHttpMessageHandler - but&amp;nbsp;PreAuthenticate is the only one I've confirmed (through testing) that we can't do without at the moment.&lt;BR /&gt;&lt;BR /&gt;So, what to do? In the meantime we'll continue to use the obsolete&amp;nbsp;ArcGISHttpClientHandler, but presumably we'll have to update it at some point. Is there some other equivalent to&amp;nbsp;PreAuthenticate that we can use with the&amp;nbsp;ArcGISHttpMessageHandler? Or can anyone point to a sample of using IWA on Android that might help? There was &lt;A href="https://support.esri.com/en-us/bug/the-arcgis-runtime-sdk-for-net-xamarin-forms-integrated-bug-000130591" target="_self"&gt;a known bug&lt;/A&gt;&amp;nbsp;on Android for Esri's IWA samples for Xamarin Forms so I believe they removed that sample, but I still don't see an IWA sample in the Maui samples project although it should apparently work in Maui.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 22:58:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1327525#M12099</guid>
      <dc:creator>FelicityRhone</dc:creator>
      <dc:date>2023-09-11T22:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISHttpClientHandler is obsolete: way to disable PreAuthenticate with ArcGISHttpMessageHandler?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1327549#M12100</link>
      <description>&lt;P&gt;Can you please confirm the .NET version you are using?. FYI, With .NET 7&amp;nbsp;&lt;SPAN&gt;IWA is now supported on Android. If you are not using .NET 7, I suggest updating to .NET 7 and re-test your IWA workflow.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 00:39:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1327549#M12100</guid>
      <dc:creator>PreetiMaske</dc:creator>
      <dc:date>2023-09-12T00:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISHttpClientHandler is obsolete: way to disable PreAuthenticate with ArcGISHttpMessageHandler?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1327556#M12101</link>
      <description>&lt;P&gt;Also want to add that there's currently &lt;A href="https://github.com/dotnet/runtime/issues/91131" target="_self"&gt;a bug in the .NET 8 Preview&lt;/A&gt;, preventing IWA from working on Android. But as Preeti said, .NET 7 should "just work". It's actually a feature that &lt;A href="https://github.com/dotnet/runtime/pull/66879" target="_self"&gt;was added to Android in .NET 7&lt;/A&gt;. It's also worth noting that &lt;A href="https://dotnet.microsoft.com/en-us/platform/support/policy/maui" target="_self"&gt;.NET 6 is no longer supported by .NET MAUI&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;Side note:&amp;nbsp;&lt;SPAN&gt;ArcGISHttpM&lt;/SPAN&gt;&lt;SPAN&gt;essageHandler is merely a delegate now. On Android it uses .NET's SocketsHttpHandler under the hood and should improve authentication across the board for Android, whereas with Xamarin.Android each message handler had their pros and cons.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 01:18:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1327556#M12101</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2023-09-12T01:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISHttpClientHandler is obsolete: way to disable PreAuthenticate with ArcGISHttpMessageHandler?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1327820#M12102</link>
      <description>&lt;P&gt;We are using .NET 7.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 16:51:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1327820#M12102</guid>
      <dc:creator>FelicityRhone</dc:creator>
      <dc:date>2023-09-12T16:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISHttpClientHandler is obsolete: way to disable PreAuthenticate with ArcGISHttpMessageHandler?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1327825#M12103</link>
      <description>&lt;P&gt;Thanks for confirming. In that case we might need some more information to replicate the issue you're referring to. We are not currently aware of IWA issues on Android.&lt;BR /&gt;&lt;BR /&gt;Having said that, any chance you could give v200.2.0 a go and see if it still reproduces? There's been quite a lot of fixes over the past year, and as mentioned, IWA on Android wasn't really supported in MAUI until .NET 7 shipped - 200.2 is built for .NET 7 on Android.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 16:57:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1327825#M12103</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2023-09-12T16:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISHttpClientHandler is obsolete: way to disable PreAuthenticate with ArcGISHttpMessageHandler?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1327831#M12104</link>
      <description>&lt;P&gt;Sure, I will try 200.2 when I have a chance and let you know how it goes.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 17:07:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1327831#M12104</guid>
      <dc:creator>FelicityRhone</dc:creator>
      <dc:date>2023-09-12T17:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISHttpClientHandler is obsolete: way to disable PreAuthenticate with ArcGISHttpMessageHandler?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1328060#M12105</link>
      <description>&lt;P&gt;I tried upgrading our app to use 200.2.0 (it was 200.0.0 before) and it made no difference. To clarify our flow: when our credential handler gets a request from the IWA portal for an AuthenticationType.NetworkCredential, we ask the user for a username/password in our own basic authentication page. We create an &lt;SPAN&gt;ArcGISNetworkCredential&amp;nbsp;from that info&lt;/SPAN&gt;, and then try to make a request to the service uri to confirm that the creds are valid, which is the point where it hangs*.&lt;BR /&gt;Our challenge handler flow is unfortunately kinda complicated due to the workarounds we needed to add along the way to get everything working in the Xamarin Forms implementation.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I then tried using our IWA portal in the ArcGIS Maps SDK .Net Samples project (.NET 7 and the 200.2 SDK), to get away from the extra stuff in our own project.&amp;nbsp;&lt;BR /&gt;I modified the ServerURL and WebMapID in OAuth.xaml.cs to point to our testing portal, and added AuthenticationManager.Current.RegisterServer with the IWA server's info.&amp;nbsp;&lt;BR /&gt;This did result in an IWA prompt coming up (cool!), but after entering my credentials I would get a 400 'invalid redirect_uri' error page instead of moving on to the ArcGIS portal sign in prompt (I did not change the "maui-ags-app://auth" redirect url that's in the sample). Does that sound expected? I'm not sure what I have to do differently with the&amp;nbsp;redirect url to get that working, or if I'm missing something else, like if the challenge handler needs to do something different for the NetworkCredential vs Token AuthenticationType... If I can get it working in the sample maybe I can simplify things in our app to match.&lt;BR /&gt;&lt;BR /&gt;* when we don't have the workarounds in place: disabling preauthentication as mentioned in my original post, and also setting the HttpClientHandlerImplementation for the project to the legacy mono implementation &amp;gt;_&amp;lt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 00:23:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1328060#M12105</guid>
      <dc:creator>FelicityRhone</dc:creator>
      <dc:date>2023-09-13T00:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGISHttpClientHandler is obsolete: way to disable PreAuthenticate with ArcGISHttpMessageHandler?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1328737#M12106</link>
      <description>&lt;P&gt;Make sure you configure your oauth app settings in the portal to have a redirect url that matches what you have in the application. If there's a mismatch, you get the error you report.&lt;BR /&gt;&lt;BR /&gt;If possible, any chance you could share something that reproduces the hang? Also where do you see the hang?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 15:44:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgishttpclienthandler-is-obsolete-way-to-disable/m-p/1328737#M12106</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2023-09-14T15:44:10Z</dc:date>
    </item>
  </channel>
</rss>

