We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Unable to run the downloaded sample - NullReferenceException

Thread ID:

Created:

Updated:

Platform:

Replies:

119784 Jul 31,2015 05:58 AM UTC Aug 4,2015 04:38 AM UTC JavaScript 3
loading
Tags: ejReportViewer
Walter Wang
Asked On July 31, 2015 05:58 AM UTC

Hi,

I just downloaded a trial version of Essential Studio v.13.2.0.29.

Selected "Run Report Samples" from the Dashboard which loads reportsample_2013, press F5 to debug and got an error: "Report Viewer encountered some issues loading this report. Please click here to see the error details" which furthers reveals there is a NullReferenceException in Syncfusion.EJ.ReportViewer.ReportHelper.ReportLoad() when it tried to extract the Authorization header. 

           string str2 = HttpContext.Current.Request.Headers["Authorization"]; string[] strArray = str2.Split(new char[] { '^' });

str2 is null here.

So what has gone wrong? How to set the Authorization header in the Request header?


Thanks,
Walter

Soundara Rajan S [Syncfusion]
Replied On August 3, 2015 08:57 AM UTC

Hi Walter,

Thanks for using Syncfusion products.

I just downloaded a trial version of Essential Studio v.13.2.0.29.
Selected "Run Report Samples" from the Dashboard which loads reportsample_2013, press F5 to debug and got an error: "Report Viewer encountered some issues loading this report. Please click here to see the error details" which furthers reveals there is a NullReferenceException in Syncfusion.EJ.ReportViewer.ReportHelper.ReportLoad() when it tried to extract the Authorization header.



string str2 = HttpContext.Current.Request.Headers["Authorization"]; string[] strArray = str2.Split(new char[] { '^' });



str2 is null here.



So what has gone wrong? How to set the Authorization header in the Request header?
This error might be occurred due to referring latest script(ej.web.all.min.js) file with ourold Syncfusion.EJ.ReportViewer assembly in your application. We have changed the header authorization key name is “Authorization” to “ejAuthenticationToken“ in both script(ej.reportviewer.js) and Syncfusion.EJ.ReportViewer assembly from our Essential Studio Version(12.4.0.24) as shown in below code snippet.
string str2 = HttpContext.Current.Request.Headers["ejAuthenticationToken
"]; string[] strArray = str2.Split(new char[] { '^' });

So, we request you to use the same version of scripts and assemblies in your application.

Please let us know, if you have any concerns.

Regards,
Soundara Rajan S.

Walter Wang
Replied On August 4, 2015 12:08 AM UTC

Hi Soundara,

Thanks for the reply. You were absolutely right, it was a version conflict issue.
I did have an older version installed and after reinstalling the latest version , all problems went away.
Thank you,
Walter

Soundara Rajan S [Syncfusion]
Replied On August 4, 2015 04:38 AM UTC

Hi Walter,

Thank you for the response. Please let us know if you need any further assistance on this.

Regards,
Soundara Rajan S.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;