This is a migrated thread and some comments may be shown as answers.

Can't display report: Report is unavailable or session has expired.

2 Answers 163 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
MJDS
Top achievements
Rank 1
MJDS asked on 08 Jul 2011, 01:21 PM
Hello all, I'm using Telerik Report for the first time. Since we use other Telerik solutions, we opted to try it.

Here is my current problem. I created the Service in my server, where all my solution services are. I created a ClassLibrary with the report, and followed the tutorial to create the viewer in my Silverlight application. Now when I try to render/view the report I get an error: "Report is unavailable or session has expired."

I debugged my server, and both the report, and the data source (an object) are created. The report works fine in design preview. I checked asp.net session, and tried both StateServer and InProc sessions with the same error. 

As someone suggestion in this forum, I debugged with Fiddler and two calls are made, with the following response:

Fist call response:
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Fri, 08 Jul 2011 12:07:42 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
Content-Length: 812
Set-Cookie: ASP.NET_SessionId=faopnca1hygazmjbd2yx4x5d; path=/; HttpOnly
Cache-Control: private
Content-Type: text/xml; charset=utf-8
 
 
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <
s:Body>
    <
RenderAndCacheResponse xmlns="Telerik.ReportService">
        <a:Error i:nil="true"/>
        <a:Actions/>
        <a:Bookmarks i:nil="true"/>
        <a:HasDocumentMap>false</a:HasDocumentMap>
        <a:InstanceID>226a967f-0ce1-4951-99a8-94449583823f</a:InstanceID>
        <
a:NavigateBackEnabled>false</a:NavigateBackEnabled>
        <
a:NavigateForwardEnabled>false</a:NavigateForwardEnabled>
        <a:PageCount>1</a:PageCount>
        <a:PageNumber>1</a:PageNumber>
        <a:Parameters/>
        <a:Report>MJDS.Relatorios.RelatorioTipoPermissao, MJDS.Relatorios, Culture=neutral, PublicKeyToken=null</a:Report>
      </RenderAndCacheResult>
    </RenderAndCacheResponse>
  </s:Body>
</s:Envelope>


Second call response:
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Fri, 08 Jul 2011 12:07:42 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
Content-Length: 436
Cache-Control: private
Content-Type: text/xml; charset=utf-8
 
 
  <s:Body>
    <GetPageResponse xmlns="Telerik.ReportService">
        <a:Error>Report is unavailable or session has expired.</a:Error>
        <a:Buffer i:nil="true"/>
        <a:PageNumber>0</a:PageNumber>
      </GetPageResult>
    </GetPageResponse>
  </s:Body>
</s:Envelope>


But the above response did not help me solve the problem. What should I do, where should I look?

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 08 Jul 2011, 06:01 PM
Hello Mjds,

The general reasons for this error are listed in the Report is unavailable or session has expired error message KB article. Additionally you can debug in VS with first chance exceptions enabled against the same version of IIS instead of Cassini and check the VS output and Event viewer for any errors. Give it a try and if you still experience any difficulties we will appreciate if you send us the problematic runnable project and more information on your deployment environment to debug locally.

Best wishes,
Peter
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
MJDS
Top achievements
Rank 1
answered on 11 Jul 2011, 02:16 PM
Hello again, and thankyou for your reply.

I did the VS configuration, and created a new app with the report, and my enviroment configuration. Aparently the problam was the Security Mode, I use our implementation of all access/membership controls, and had to set everything to TransportWithMessageCredential, the problem was in the WebHttpBinding, I set it to TransportCredentialOnly and it worked:

<bindings>
  <basicHttpBinding>
    <binding name="TelerikBasicHttpBindingConfig">
      <security mode="TransportWithMessageCredential"/>
    </binding>
  </basicHttpBinding>
  <webHttpBinding>
    <binding name="TelerikWebHttpBindingConfig">
      <security mode="TransportCredentialOnly"/>
    </binding>
  </webHttpBinding>
</bindings>
<behaviors>
   <endpointBehaviors>
     <behavior name="TelerikBehavior">
       <webHttp />
     </behavior>
   </endpointBehaviors>
</behaviors>
<services>
  <service name="Telerik.Reporting.Service.ReportService" behaviorConfiguration="BehaviorTelerik">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="TelerikBasicHttpBindingConfig" contract="Telerik.Reporting.Service.IReportService" />
    <endpoint address="resources" binding="webHttpBinding" bindingConfiguration="TelerikWebHttpBindingConfig" behaviorConfiguration="TelerikBehavior" contract="Telerik.Reporting.Service.IResourceService" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>
Tags
General Discussions
Asked by
MJDS
Top achievements
Rank 1
Answers by
Peter
Telerik team
MJDS
Top achievements
Rank 1
Share this question
or