I'm using Infragistics 14.2 in an ASP.NET Web Forms project (4.5). I copied over a report from a 14.1 project and updated all the data bindings. However, the report fails to load an image from the database.
I tested to see if it pulled the correct image record (it does, I can have a label display the image Id, etc.), but instead of displaying the image (from binary data) it shows a URL like: https://localhost:12345/477c4e45-3670-4d2d-be03-e2bf27fcffeb/image.1.False.igrResource
The resource guid in the URL changes every time, but the end of the URL (image.1.False.igrResource) is always the same.
In my Web.config, I noticed some changes between 14.1 and 14.2. My current 14.2 project has a different handler name (14.1 used "IgReportingResourcesHandler" and had an additional parameter: resourceType="Unspecified"). Everything else works fine, though, so I don't know what the issue is.
<handlers> <add name="ReportResourceHandler" path="*.igrResource" verb="*" type="Infragistics.Reports.Server.ResourcesHandler, InfragisticsWPF4.Reports.Server.v14.2, Version=14.2.20142.1016, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" /> </handlers>
Here's the BLOCKED SCRIPT
<script type="text/javascript"> var serviceEndpoint = "/Report/Reporting/ReportService1.svc/ajaxAddress/"; $(function () { $("#viewer").igReportViewer({ width: 1400, height: 1200, contentType: 'application/json; charset=utf-8', renderSettings: { definitionUri: '<%= _definitionUri%>', serviceEndpointUri: serviceEndpoint } }); $('#viewer .buttonExport').hide(); $('#viewer .buttonPrint').hide(); }); </script> <div id="viewer" ></div>
The code behind:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load _definitionUri = "/InfragReportingTest;component/Reporting/Report1.igr" End Sub
From the web.config:
<system.serviceModel> <behaviors> <endpointBehaviors> <behavior name="SilverlightFaultBehavior"> <silverlightFaults /> </behavior> <behavior name="JsonFaultBehavior"> <enableWebScript /> <jsonFaults /> </behavior> </endpointBehaviors> <serviceBehaviors> <behavior name="ReportProcessorServiceBehavior"> <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> <bindings> <customBinding> <binding name="binaryHttpBinding"> <binaryMessageEncoding /> <httpTransport /> </binding> </customBinding> <webHttpBinding> <binding name="webBinding"> <security mode="Transport"> <transport clientCredentialType="None"></transport> </security> </binding> </webHttpBinding> </bindings> <extensions> <behaviorExtensions> <add name="silverlightFaults" type="Infragistics.Reports.Server.SilverlightFaultBehavior, InfragisticsWPF4.Reports.Server.v14.2, Version=14.2.20142.1016, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" /> <add name="jsonFaults" type="Infragistics.Reports.Server.JsonErrorWebHttpBehaviorElement, InfragisticsWPF4.Reports.Server.v14.2, Version=14.2.20142.1016, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" /> </behaviorExtensions> </extensions> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> <services> <service behaviorConfiguration="ReportProcessorServiceBehavior" name="Infragistics.Reports.Server.ReportProcessorService"> <endpoint address="soapAddress" behaviorConfiguration="SilverlightFaultBehavior" binding="customBinding" bindingConfiguration="binaryHttpBinding" contract="Infragistics.Reports.Server.IReportProcessorService"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="ajaxAddress" behaviorConfiguration="JsonFaultBehavior" binding="webHttpBinding" bindingConfiguration="webBinding" contract="Infragistics.Reports.Server.IReportProcessorService" /> <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" /> </service> </services> </system.serviceModel> <system.webServer> <handlers> <add name="ReportResourceHandler" path="*.igrResource" verb="*" type="Infragistics.Reports.Server.ResourcesHandler, InfragisticsWPF4.Reports.Server.v14.2, Version=14.2.20142.1016, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" /> </handlers> <modules> <add name="ReportProcessorServiceModule" type="Infragistics.Reports.Server.ReportProcessorServiceModule, InfragisticsWPF4.Reports.Server.v14.2, Version=14.2.20142.1016, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" /> </modules> </system.webServer>
It works fine with the default configuration (what's originally in web.config, not what is currently pasted), and it works for https using localhost and IIS Express. It fails on the production server.
The page with the report shows this: Object reference not set to an instance of an object.
And there's a Javascript error for the CreateSessionForReport that says "not well-formed".
If I go to the CreateSessionForReport method (https://www.website.com/Report/Reporting/reportservice1.svc/ajaxAddress/CreateSessionForReport then it says "Method no allowed" and has the following css error: Error in parsing value for 'white-space'. Declaration dropped.
If I go to the .svc URL then it shows the service has been created. If I go to the URL: https://www.website.com/Report/Reporting/ReportService1.svc/ajaxAddress then I receive the message "Endpoint not found".
Hello Zairja Llull,
Thank you for the update.
Without a sample or code-snippet I can use to reproduce this issue, it is difficult for me to determine what the underlying cause is. If you find that recreated the report from scratch doesn't resolve this issue, please update me with a sample I can use to debug this issue in my environment. If needed, I will be happy to create a case for you to upload the sample to ensure it is kept private.
I am looking forward to your update.
The image failed to load when I removed the SSL configuration. I'm going to try to recreate the report from scratch, as well as recopy the updated report from the working project. Other than that, I'm still at a loss.
Edit: Also, using the SSL configuration in that link didn't work and resulted in System.ServiceModel.ServiceActivationException, so I'm going to have to stay with the working configuration we use in production for the time being.
Hi Zairja Llull,
To ensure the SSL configuration in the application is what's causing the issue, can you temporarily remove the SSL configuration to see if the images loads? Also, please note, that the WCF bindings seed to be specified on the server and client when SSL is used. http://ko.infragistics.com/community/forums/t/73627.aspx
Also, I just finished upgrading a 14.1 project to 14.2 that contained the original report. It doesn't have this issue, but I've noticed that when the report first loads it (very briefly) shows that same URL in the box where the image is displayed before the image is successfully shown. When I right-click "Copy Image Location", I get the same URL as in the project where the image doesn't load (in this project the image does load, though).
The only difference I can see between the two web applications is that one uses SSL and the other doesn't. The one that uses SSL is where the image fails to load. The Web.config has this added:
<webHttpBinding> <binding name="webBinding"> <security mode="Transport"> </security> </binding> </webHttpBinding>
In the <bindings> after the "binaryHttpBinding" used by the Report and:
<endpoint address="ajaxAddress" behaviorConfiguration="JsonFaultBehavior" bindingConfiguration="webBinding" binding="webHttpBinding" contract="Infragistics.Reports.Server.IReportProcessorService" />
The bindingConfiguration is added to this endpoint in the <services> section. All of which is in the <system.serviceModel> of Web.config.