<?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 connecting to QlikSense through certificate in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-connecting-to-QlikSense-through-certificate/m-p/68177#M962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you do a direct connection, then you should typically add the Engine port number to the Uri. Default value for this is 4747 for a Server installation of Qlik Sense (4848 for desktop). Check out this example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/AptkQlik/PublicExamples/blob/master/ConnectDirectLocalServer/ConnectDirectLocalServer/Program.cs#L12" title="https://github.com/AptkQlik/PublicExamples/blob/master/ConnectDirectLocalServer/ConnectDirectLocalServer/Program.cs#L12"&gt;https://github.com/AptkQlik/PublicExamples/blob/master/ConnectDirectLocalServer/ConnectDirectLocalServer/Program.cs#L12&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Apr 2018 07:51:04 GMT</pubDate>
    <dc:creator>Øystein_Kolsrud</dc:creator>
    <dc:date>2018-04-16T07:51:04Z</dc:date>
    <item>
      <title>.NET SDK - error connecting to QlikSense through certificate</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-connecting-to-QlikSense-through-certificate/m-p/68176#M961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use the .NET SDK to connect to a QlikSense server (febbruary 2018 version) using a certificate.&lt;/P&gt;&lt;P&gt;I exported the certificate from the QMC (including private key) and then I try to use this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15230115937209224 jive_text_macro" jivemacro_uid="_15230115937209224" modifiedtitle="true"&gt;
&lt;P&gt;&lt;SPAN&gt;Uri uri = new Uri("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://mysenseserver.local" rel="nofollow" target="_blank"&gt;https://mysenseserver.local&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;var senseLocation = Qlik.Engine.Location.FromUri(uri);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//Load certificate&lt;/P&gt;
&lt;P&gt;X509Certificate2 x509 = new X509Certificate2(@"C:\client.pfx", "cert_password", X509KeyStorageFlags.UserKeySet);&lt;/P&gt;
&lt;P&gt;X509Certificate2Collection x509coll = new X509Certificate2Collection(x509);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//Connect to QlikSense server&lt;/P&gt;
&lt;P&gt;senseLocation.AsDirectConnection(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "myuserdir", //User directory&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "administrator", //UserID (this user is RootAdmin)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; false,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; false,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; x509coll //Certificate&lt;/P&gt;
&lt;P&gt;);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//Connect to app&lt;/P&gt;
&lt;P&gt;var appIdentifiers = senseLocation.GetAppIdentifiers(); //This causes exception...&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this causes the following exception:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;GeneralCommunicationException with communication error WebSocketClosed and http error code 500&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; at Qlik.Engine.Communication.QlikConnection.AwaitResponseTask&lt;T&gt;(T task, String methodName, CancellationToken cancellationToken)&lt;/T&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; at Qlik.Engine.Communication.QlikConnection.Ping(Nullable`1 noVersionCheck)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; at Qlik.Engine.LocationExtensions.Hub(ILocation location, ISession session, Nullable`1 noVersionCheck)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; at Qlik.Engine.LocationExtensions.GetAppIdentifiers(ILocation location, Nullable`1 noVersionCheck)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; at QlikExporter.Core.Logic.SenseAgent.ConnectToApp() &lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;can anyone tell me what I'm doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Apr 2018 10:49:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-connecting-to-QlikSense-through-certificate/m-p/68176#M961</guid>
      <dc:creator>master_t</dc:creator>
      <dc:date>2018-04-06T10:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: .NET SDK - error connecting to QlikSense through certificate</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-connecting-to-QlikSense-through-certificate/m-p/68177#M962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you do a direct connection, then you should typically add the Engine port number to the Uri. Default value for this is 4747 for a Server installation of Qlik Sense (4848 for desktop). Check out this example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/AptkQlik/PublicExamples/blob/master/ConnectDirectLocalServer/ConnectDirectLocalServer/Program.cs#L12" title="https://github.com/AptkQlik/PublicExamples/blob/master/ConnectDirectLocalServer/ConnectDirectLocalServer/Program.cs#L12"&gt;https://github.com/AptkQlik/PublicExamples/blob/master/ConnectDirectLocalServer/ConnectDirectLocalServer/Program.cs#L12&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2018 07:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-connecting-to-QlikSense-through-certificate/m-p/68177#M962</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2018-04-16T07:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: .NET SDK - error connecting to QlikSense through certificate</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-connecting-to-QlikSense-through-certificate/m-p/68178#M963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that was the issue! Port 4747 is working correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2018 08:09:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/NET-SDK-error-connecting-to-QlikSense-through-certificate/m-p/68178#M963</guid>
      <dc:creator>master_t</dc:creator>
      <dc:date>2018-04-16T08:09:12Z</dc:date>
    </item>
  </channel>
</rss>

