Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Invalid report file path after not viewing a report for a while

Posted on 2006-06-19
6
Medium Priority
?
1,592 Views
Last Modified: 2008-01-09
Hi, I have an ASP.Net app using VB.Net and Crystal Reports v10.  I have a page that displays a crystal report within a form (named frmReport) with runat="server" set.  The report works fine when I first navigate to the page, and is refreshed OK when ReportRefresh is called by the user selecting the Refresh button.  The problem I am having is that if I leave the page open and return to the report after a while and click the Refresh button I get an 'Invalid report file path' error when the reportdocument.Refresh is called in the ReportRefresh event.

It it possible that something is timing out, possibly something to do with the reportdocument or the frmReport?

Thanks
0
Comment
Question by:nicksbell
  • 3
  • 3
6 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 16934767
>>> It it possible that something is timing out

Yes.  I suspect that the session state is timing out - by default IIS has a 20 minute timeout  for sessions so after that period of activity the server drops the state.  When the client sends a request the server no longer has the corresponding information.  In this case the server probably stores the path to a temporary report file and when the session is dropped so is the temp file.

You can increase the timeout period in IIS, but that can have major performance implications for your server so that isn't something to do lightly.

frodoman
0
 
LVL 2

Author Comment

by:nicksbell
ID: 16934787
Is it possible to reestablish the state in the vb.code.  i.e. is it possible for me to trap the invalid report file path error and then refresh/renew/reload the whole page?  If so how would I do that?

NB
0
 
LVL 42

Expert Comment

by:frodoman
ID: 16934933
It isn't possible to reestablish the state.  It is possible to wrap your code in a TRY..CATCH block and trap for that error.  What you'd probably want to do is if you encounter that error, redirect to a static page that explains the user's session has timed out.  On that page you can have a link that takes them back to the report (which will be treated as the first hit on the page and will reload as a new page instead of trying to refresh expired content).

Depending on your app, you may need the link to redirect to a login page, etc. instead of directlyl to the report - that just depends on how your application works.

frodoman
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Author Comment

by:nicksbell
ID: 16935284
ok, thanks.  As another suggestion, rather then increasing the internet explorer timeout, is it possible for the webpage to send a 'keep alive' signal back to the server so I can control which pages don't timeout?

0
 
LVL 42

Accepted Solution

by:
frodoman earned 1500 total points
ID: 16935666
Yes, that's possible.  You just need to add a meta tag to the HTML on your page.  This will auto-refresh every 10 minutes, for example:  <META http-equiv="Refresh" content="10">

Keep in mind that this is the same as the user clicking the refresh button on their browser - so it may not refresh back to the same page on the report, but more likely will recreate the report from scratch.

Also you might be interested in this - prompting user before session expires: http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/Q_21740156.html

Maybe you'll want to combine the two solutions.  Prompt the user at one interval but if they still haven't responded have your auto-refresh interval set to just less than your IIS timeout.  Also note that the timeout can be specified in your web.config file.  From my understanding though this can be shorter than the IIS setting but if you make it longer then the IIS setting will still be used.

frodoman
0
 
LVL 2

Author Comment

by:nicksbell
ID: 16937956
Thanks for all your help, it was all very useful.

Nick
0

Featured Post

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question