Tuesday, March 10, 2009

Execution < guid > cannot be found (rsExecutionNotFound)

This happened when running our .Net SCM Reporting web application that accesses SQL reports using Report Viewer. After leaving the web application idle for some time, I got the error message "Execution <> cannot be found". guid can be either empty or a string like 'j4j3vfblcanzv3qzcqhvml55'. This happened on either the local web server/SQL report server, or other clients.

Tried to set AsyncRendering="False" in the ReportViewer control as sugguested in some web sources. It did not work.

The following solution from John Gallardo's blog makes the problem less often. It modifies the SessionTimeout and SessionAccessTimeout system properties. It sets timeout to be an hour and a half. The setting should be used with caution as temporary session snapshots will not be aged out as often.

' sessionTimeout.rss
Public Sub Main()

Dim props() as [Property]
props = new [Property] () { new [Property](), new [Property]() }
props(0).Name = "SessionTimeout"
props(0).Value = timeout
props(1).Name = "SessionAccessTimeout"
props(1).Value = timeout
rs.SetSystemProperties(props)
End Sub

E:\_qinl>rs -i sessionTimeout.rss -s http://localhost/reportserver -v timeout="6000"
The command completed successfully