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. Image for the cookie policy date

Unable to run the downloaded sample - NullReferenceException

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

3 Replies

SR Soundara Rajan S Syncfusion Team 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.


WW Walter Wang 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


SR Soundara Rajan S Syncfusion Team 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.

Loader.
Live Chat Icon For mobile
Up arrow icon