Background 1:
ASP.NET v1.1
VS 2003
Crystal Report XI R2
Windows XP
In this background, all reports generated as normal and no exception.
Background 2:
ASP.NET 1.1
VS 2003
Crystal Report 2008
Windows Server 2008
In this background, when I generate a report for 1st and 2nd time, it's output as normal. However, timeout will be happened if generate a report for 3rd time. I tried run in debug mode, after execute the rd.load("xxxx.rpt"), the web go timeout without error.
The coding as following:
rd.Load(Request.PhysicalApplicationPath & "Report.rpt")
stream=rd.ExportToStream(CrystalDecisions[Shared].ExportFormatType.PortableDocFormat)
binReader = New System.IO.BinaryReader(stream)
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.BinaryWrite(binReader.ReadBytes(binReader.BaseStream.Length))
Response.Flush()
Response.Close()
ds.Dispose()
ds = Nothing
binReader.Close()
binReader = Nothing
stream.Flush()
stream.Close()
stream = Nothing
rd.Close()
rd.Dispose()
rd = Nothing
Please advise. Thanks!