Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Unable to connect to QlikSense server through .NET SDK

Hi,

  I am trying to connect Qlik Sense server through dotnet sdk and getting below mentioned error:-

Qlik.Sense.JsonRpc.CommunicationErrorException: Connection failed after 4 attempts. Error message:

Value cannot be null.

I tried :-

  location.AsNtlmUserViaProxy(proxyUsesSsl: uri.Scheme.Equals(Uri.UriSchemeHttps), loginCredentials: new NetworkCredential(username, password, domain));

Please help me to solve this issue.

Thanks,

Nayana

13 Replies
Øystein_Kolsrud
Employee
Employee

Can you provide a stack trace? It would be interesting to see where that "Value cannot be null" is coming from. I'm unable to reproduce it.

And what version of the SDK and Qlik Sense server are you using?

Anonymous
Not applicable
Author

Hi Qystein ,Thank you for your reply,

I am using Qlik Sense Server version 2.2.4.0  for this. Here is the stack trace,

Stack Trace :-

   at Qlik.Engine.Communication.QlikConnection.AwaitResponseTask(T task, String methodName, CancellationToken cancellationToken)

   at Qlik.Engine.Communication.QlikConnection.Ping(Nullable`1 noVersionCheck)

   at Qlik.Engine.LocationExtensions.Hub(ILocation location, ISession session, Nullable`1 noVersionCheck)

   at Qlik.Engine.LocationExtensions.GetAppIdentifiers(ILocation location, Nullable`1 noVersionCheck)

   at Login.Button1_Click(Object sender, EventArgs e) in c:\Qlik\Login.aspx.cs:line 21

   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)

   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)

   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)

   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Anonymous
Not applicable
Author

I am using Visual Studio 2015, QlikSense Server version 2.2.4.0, Qlik Sense .net SDK 3.1,

and stack trace is,

   at Qlik.Engine.Communication.QlikConnection.AwaitResponseTask(T task, String methodName, CancellationToken cancellationToken)

   at Qlik.Engine.Communication.QlikConnection.Ping(Nullable`1 noVersionCheck)

   at Qlik.Engine.LocationExtensions.Hub(ILocation location, ISession session, Nullable`1 noVersionCheck)

   at Qlik.Engine.LocationExtensions.GetAppIdentifiers(ILocation location, Nullable`1 noVersionCheck)

   at Login.Button1_Click(Object sender, EventArgs e) in c:\Qlik\Login.aspx.cs:line 21

   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)

   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)

   at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)

   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Øystein_Kolsrud
Employee
Employee

And you're still seeing that "Value cannot be null" message? I'm still not able to reproduce that. Have you tried to connect to that server with the "Qlik Explorer for Developers" tool? Try and see if you get the same message there. That tool uses the.Net SDK under the hood. Instructions for downloading the tool can be found here:

Qlik Explorer for Developers is here!

Anonymous
Not applicable
Author

Hi Qystein,

        Thank You for your information. Let me try about this.

Thank You,

Nayana

Anonymous
Not applicable
Author

valuecannotbenull.jpg

credentials with passing domain\username and password :-same "value cannot be null" error,but when I use the same host directly copy and paste to URL I can authenticate the server using the same credentials. Please help me .

Anonymous
Not applicable
Author

Hi Øystein ,

          I have one doubt regarding QlikSense login process through dotnet,

for location.AsNtlmUserViaProxy(..) needs valid certificate ?? or without virtual proxy settings and  without certificate we can authenticate qliksense server through our dotnet login page??

I am trying to authenticate server by passing username,passsword and domain ...through location.

Please guide me.

Thank You,

Nayana

Øystein_Kolsrud
Employee
Employee

You might be able to get more information if you activate debug logs in your C# program. Try add this line before the line that causes the failure:

var theConsole = new DebugConsole();

That will print to standard out. Or if you want to write to file instead, you can write like this:

var theConsole = new DebugConsole(new StreamWriter(<path to file>));

That debug output might provide more information.

Anonymous
Not applicable
Author

Hi , I have one doubt regarding qliksense authentication.

Is it possible to authenticate the qliksense without certificates?Please help me.

Thanks,

Nayana