<?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 OAuthAuthorizationHandler doesn't work with WinForms application in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/oauthauthorizationhandler-doesn-t-work-with/m-p/308853#M3590</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I've created a WPF map control which I've embedded in a Windows Forms control using the ElementHost control.&amp;nbsp; When attempting to load a secured a webmap no sign in window is produced.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the recommendation of Michael Branscomb, I was able to dig into the source code of the OAuthAuthorizationHandler since it's supplied with the ArcGIS.Runtime.Toolkit.&amp;nbsp; It turns out that the source code assumes that the host application is a WPF application by calling Application.Current to get a hook on the application's Dispatcher and MainWindow.&amp;nbsp; This allows the sign in window to be centered and modal.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var dispatcher = Application.Current.Dispatcher;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since my application is a Windows Forms application I modified a copy of the OAuthAuthorizationHandler to open the sign in window on it's own thread as a non-modal window if the application is not a WPF application.&amp;nbsp; This works and I've attached the source code if anyone is interested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question /&amp;nbsp; concern now has to do with Quartz.&amp;nbsp; At the Devsummit it was stated that Quartz will have better Authentication support.&amp;nbsp; I assume that means more black-boxed.&amp;nbsp; Will I have to, or even be able to, make a similar hack?&amp;nbsp; Or better yet, can the Quartz team look at this issue and add support for non-WPF applications?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Apr 2016 19:42:06 GMT</pubDate>
    <dc:creator>MattBryant</dc:creator>
    <dc:date>2016-04-04T19:42:06Z</dc:date>
    <item>
      <title>OAuthAuthorizationHandler doesn't work with WinForms application</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/oauthauthorizationhandler-doesn-t-work-with/m-p/308853#M3590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I've created a WPF map control which I've embedded in a Windows Forms control using the ElementHost control.&amp;nbsp; When attempting to load a secured a webmap no sign in window is produced.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the recommendation of Michael Branscomb, I was able to dig into the source code of the OAuthAuthorizationHandler since it's supplied with the ArcGIS.Runtime.Toolkit.&amp;nbsp; It turns out that the source code assumes that the host application is a WPF application by calling Application.Current to get a hook on the application's Dispatcher and MainWindow.&amp;nbsp; This allows the sign in window to be centered and modal.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var dispatcher = Application.Current.Dispatcher;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since my application is a Windows Forms application I modified a copy of the OAuthAuthorizationHandler to open the sign in window on it's own thread as a non-modal window if the application is not a WPF application.&amp;nbsp; This works and I've attached the source code if anyone is interested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question /&amp;nbsp; concern now has to do with Quartz.&amp;nbsp; At the Devsummit it was stated that Quartz will have better Authentication support.&amp;nbsp; I assume that means more black-boxed.&amp;nbsp; Will I have to, or even be able to, make a similar hack?&amp;nbsp; Or better yet, can the Quartz team look at this issue and add support for non-WPF applications?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 19:42:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/oauthauthorizationhandler-doesn-t-work-with/m-p/308853#M3590</guid>
      <dc:creator>MattBryant</dc:creator>
      <dc:date>2016-04-04T19:42:06Z</dc:date>
    </item>
  </channel>
</rss>

