<?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: .NET SDK - error message &amp;quot;Ticket retrieval failed&amp;quot; in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2013563#M17719</link>
    <description>&lt;P&gt;Hi! It looks like you are configuring your connection as both "AsDirectConnectionToPersonalEdition" and "AsNtlmUserViaProxy". You should probably remove the first one.&lt;/P&gt;&lt;P&gt;And since you are using the "proxyUsesSsl"-argument you must be using a relatively old version of the SDK (it was deprecated in v15.2.1) so you might want to go to a more resent version and see if it works there.&lt;/P&gt;&lt;P&gt;But you say you have a "virtual proxy where I have selected the ticket as the authentication method". Perhaps you simply need to use the proxy in the path like this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var location = Location.FromUri(new Uri("https://mydomain.com/myproxy"));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Dec 2022 08:29:44 GMT</pubDate>
    <dc:creator>Øystein_Kolsrud</dc:creator>
    <dc:date>2022-12-07T08:29:44Z</dc:date>
    <item>
      <title>.NET SDK - error message "Ticket retrieval failed"</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2013429#M17718</link>
      <description>&lt;P class="p1"&gt;Hi.&lt;/P&gt;
&lt;P class="p1"&gt;I'm a newbie on the .NET SDK approach so I'm trying to use&amp;nbsp;&amp;nbsp;Øystein Kolsrud example on github (&lt;A href="https://github.com/kolsrud/qlik-dot-net-sdk-hypercube-usage" target="_blank"&gt;&lt;SPAN class="s1"&gt;https://github.com/kolsrud/qlik-dot-net-sdk-hypercube-usage&lt;/SPAN&gt;&lt;/A&gt;) as a baseline so I can make my own solution. For this reason,&amp;nbsp;first, I was trying to test his example to check if I could connect with my Qlik Sense server, but unfortunately, I'm getting the error message:&amp;nbsp;"Ticket retrieval failed".&lt;/P&gt;
&lt;P class="p1"&gt;Additional information:&amp;nbsp; I have a virtual proxy where I have selected the ticket as the authentication method.&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;I have also checked the &lt;A href="https://community.qlik.com/t5/Integration-Extension-APIs/quot-Ticket-retrieval-failed-quot-when-trying-to-access-Qlik/td-p/1751605" target="_blank"&gt;&lt;SPAN class="s3"&gt;https://community.qlik.com/t5/Integration-Extension-APIs/quot-Ticket-retrieval-failed-quot-when-trying-to-access-Qlik/td-p/1751605&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;but unfortunately it didn't help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;private static ILocation ConnectToDesktop()
        {
            var location = Location.FromUri(new Uri("https://mydomain.com"));
            location.AsDirectConnectionToPersonalEdition();
            location.AsNtlmUserViaProxy(proxyUsesSsl: false);
            return location;
        }

private static void Main(string[] args)
        {
            using (var hub = ConnectToDesktop().Hub()) &amp;lt;--- crashes in here
            {
                var theApp = PrepareApp(hub);
                HyperCubeExamples(theApp);
                Paging(theApp);
                MultipleHyperCubesExamples(theApp);
            }
        }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Error:
System.Security.Authentication.AuthenticationException 
Message=Ticket retrieval failed. 
Source=Qlik.Engine 

StackTrace: 
at Qlik.Engine.Communication.QlikConnection.AwaitResponseTask[T](T task, String methodName, CancellationToken cancellationToken) 
at Qlik.Engine.Communication.QlikConnection.AwaitResponse(Task task, String methodName, CancellationToken cancellationToken) 
at Qlik.Engine.Communication.QlikConnection.Ping() 
at Qlik.Engine.LocationExtensions.DisposeOnError(IDisposable o, Action f) 
at Qlik.Engine.LocationExtensions.Hub(ILocation location, ISession session) 
at HypercubeUsage.Program.Main(String[] args)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;Really appreciate any help.&lt;/P&gt;
&lt;P class="p1"&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 01:21:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2013429#M17718</guid>
      <dc:creator>SVAS</dc:creator>
      <dc:date>2022-12-07T01:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: .NET SDK - error message "Ticket retrieval failed"</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2013563#M17719</link>
      <description>&lt;P&gt;Hi! It looks like you are configuring your connection as both "AsDirectConnectionToPersonalEdition" and "AsNtlmUserViaProxy". You should probably remove the first one.&lt;/P&gt;&lt;P&gt;And since you are using the "proxyUsesSsl"-argument you must be using a relatively old version of the SDK (it was deprecated in v15.2.1) so you might want to go to a more resent version and see if it works there.&lt;/P&gt;&lt;P&gt;But you say you have a "virtual proxy where I have selected the ticket as the authentication method". Perhaps you simply need to use the proxy in the path like this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var location = Location.FromUri(new Uri("https://mydomain.com/myproxy"));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 08:29:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2013563#M17719</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2022-12-07T08:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: .NET SDK - error message "Ticket retrieval failed"</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2016462#M17762</link>
      <description>&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Employee"&gt;&lt;SPAN class="lia-link-navigation lia-page-link lia-link-disabled lia-user-name-link" aria-disabled="true"&gt;&lt;SPAN class="login-bold"&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41242"&gt;@Øystein_Kolsrud&lt;/a&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Employee"&gt;&lt;SPAN class="lia-link-navigation lia-page-link lia-link-disabled lia-user-name-link" aria-disabled="true"&gt;&lt;SPAN class="login-bold"&gt;Thank you very much for your feedback.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Employee"&gt;&lt;SPAN class="lia-link-navigation lia-page-link lia-link-disabled lia-user-name-link" aria-disabled="true"&gt;&lt;SPAN class="login-bold"&gt;I tried your suggestions - I have updated the code and use it like this:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;var location = Location.FromUri(new Uri("https://mydomain.com"));
//var location = Location.FromUri(new Uri("https://mydomain.com/myproxy"));
location.VirtualProxyPath = "myproxy";
location.AsNtlmUserViaProxy();&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Employee"&gt;&lt;SPAN class="lia-link-navigation lia-page-link lia-link-disabled lia-user-name-link" aria-disabled="true"&gt;&lt;SPAN class="login-bold"&gt;but, unfortunately, it didn't work .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Could it be because I'm using the ticket as the authentication method? I'm asking this because in the QMC when I allow anonymous users and&amp;nbsp; put the code like this it works:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;var location = Location.FromUri(new Uri("https://mydomain.com/myproxy"));
location.AsAnonymousUserViaProxy();&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also tried to extract ticket from cookies but it only worked when it was anonymous. If I change it to not allow anonymous user it doesn't work.&lt;/P&gt;
&lt;P&gt;Unfortunately, and despite working, I cannot use it as anonymous.&lt;/P&gt;
&lt;P&gt;I'm trying to do a restful api (.Net Core Web Api) to connect and get the data&amp;nbsp;from Qlik and communicate with the frontend to display the results.&lt;/P&gt;
&lt;P&gt;Sorry for the newbie questions, but from your experience should I use a virtual proxy? what should be the authentication method that I should use?&lt;/P&gt;
&lt;P&gt;Thank you again for your help and please let&amp;nbsp; me know if you have any suggestion.&lt;/P&gt;
&lt;DIV id="messageEditor_11336a3679fdea9_0" class="MessageEditor"&gt;
&lt;DIV class="lia-js-block-events"&gt;
&lt;DIV class="lia-form-row lia-form-body-entry"&gt;
&lt;DIV class="lia-quilt-row lia-quilt-row-standard"&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;
&lt;DIV class="lia-form-input-wrapper"&gt;
&lt;DIV id="rich_11336a3679fdea9_716d8" class="message-body-editor lia-inline-message-body-editor"&gt;
&lt;DIV id="mceu_91" class="mce-tinymce mce-container mce-panel lia-editor-gte-2" tabindex="-1" role="application"&gt;
&lt;DIV id="mceu_91-body" class="mce-container-body mce-stack-layout"&gt;
&lt;DIV id="mceu_92" class="mce-top-part mce-container mce-stack-layout-item mce-first"&gt;
&lt;DIV id="mceu_92-body" class="mce-container-body"&gt;
&lt;DIV id="mceu_93" class="mce-toolbar-grp mce-container mce-panel mce-first mce-last" tabindex="-1" role="group"&gt;
&lt;DIV id="mceu_93-body" class="mce-container-body mce-stack-layout"&gt;
&lt;DIV id="mceu_94" class="mce-container mce-toolbar mce-stack-layout-item mce-first" role="toolbar"&gt;
&lt;DIV id="mceu_94-body" class="mce-container-body mce-flow-layout"&gt;
&lt;DIV id="mceu_95" class="mce-container mce-flow-layout-item mce-first mce-last mce-btn-group" role="group"&gt;
&lt;DIV id="mceu_95-body"&gt;
&lt;DIV id="mceu_53" class="mce-widget mce-btn mce-btn-small lia-mce-toolbar-bold" tabindex="0" role="button" aria-pressed="false" aria-label="Bold"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 14 Dec 2022 15:38:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2016462#M17762</guid>
      <dc:creator>SVAS</dc:creator>
      <dc:date>2022-12-14T15:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: .NET SDK - error message "Ticket retrieval failed"</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2016641#M17766</link>
      <description>&lt;P&gt;So anonymous connection works, but not NTLM? Do you know if your proxy uses Kerberos authentication? There's a checkbox for this in the "Ports" section of the "Proxies" configuration.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 15:27:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2016641#M17766</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2022-12-14T15:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: .NET SDK - error message "Ticket retrieval failed"</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2016677#M17768</link>
      <description>&lt;P&gt;I have checked and it doesn't - the Kerberos authentication checkbox is unchecked.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 16:13:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2016677#M17768</guid>
      <dc:creator>SVAS</dc:creator>
      <dc:date>2022-12-14T16:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: .NET SDK - error message "Ticket retrieval failed"</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2018497#M17810</link>
      <description>&lt;P&gt;OK, that could have complicated things. But just to be sure I understand you correctly, you have a virtual proxy using "Ticket" authentication with "Windows" pattern? And that same virtual proxy also allows anonymous connection? Or are these two different virtual proxies?&lt;/P&gt;&lt;P&gt;And then you say that this works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var location = Location.FromUri("https://mydomain.com/myproxy");
location.AsAnonymousUserViaProxy();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this doesn't?:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var location = Location.FromUri("https://mydomain.com/myproxy");
location.AsNtlmUserViaProxy();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 09:33:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-message-quot-Ticket-retrieval-failed-quot/m-p/2018497#M17810</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2022-12-29T09:33:11Z</dc:date>
    </item>
  </channel>
</rss>

