I am running SQL Reporting Services and SQL Server 2005 on a Windows 2003 server. The configuration has been unchanged for approx. 3 weeks. Suddenly today, reports being accessed via an ASP.NET 2.0 application (on Windows 2003 Server with IIS 6) using a SOAP call to the reportserver became inaccessable. End users received the following error:
Message: An error occurred during rendering of the report. >
An error occurred during rendering of the report. >
An error occurred during rendering of the report. >
An error occurred during rendering of the report. >
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.Stack Trace: at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at IFA.CAP.SQLReportingService.ReportingService.Render(String Report, String Format, String HistoryID, String DeviceInfo, ParameterValue[] Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle, String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed, Warning[]& Warnings, String[]& StreamIds) in C:\Applications\IFACAP\Web References\SQLReportingService\Reference.vb:line 1319
at IFA.CAP.BusinessObjects.Reports.Certificate(Int32 certificateID, Boolean isDraft, Boolean isCertified) in C:\Applications\IFACAP\BusinessObjects\IFA.CAP.BusinessObjects.Report.vb:line 551
at IFA.CAP.CertificateDetail.PrintCertificate(Object sender, EventArgs e) in C:\Applications\IFACAP\Main\CertificateDetail.aspx.vb:line 2287
Subsequently, the following error is logged on the Report Server/Database server:
Report Server (MSSQLSERVER) cannot connect to the report server database.
I was able to temporarily correct the problem by performing as iisrest on the Report Server/Database server. However, the same problem occured again a couple hours later. I am relatively new to SQL Reporting Services so any help would be appreciated.
MDJ
Well, the "Report Server (MSSQLSERVER) cannot connect to the report server database" error seems to have vanished but I am still receiving the "Message: An error occurred during rendering of the report. >
An error occurred during rendering of the report. >
An error occurred during rendering of the report. >
An error occurred during rendering of the report. >
Attempted to read or write protected memory. This is often an indication that other memory is corrupt." error. Once whatever is causing this problem occurs, all users attempting to access SSRS from our ASP.NET application (using SOAP) receive the aforementioned error.
I have tried the following:
1. increased the MaxActiveReqForOneUser element in the RSWebApplication.config
2. Set the AppPool recycling setting for the ReportServer to run only once at a specified time (thinking perhaps the pool was recycling and corrputing session information).
Things I've noticed:
So far the only resolution for this issue is to perform an iisrest on the ReportServer.
This only seems to be an issue with reports being called using SOAP. Reports being rendering in the .NET Report Viewer control appear unaffected.
Here is some sample code to illustrate how we call some of our reports from ASP.NET through the SSRS web service:
************************************************************************************************************************************
Private callback As New System.Net.Security.RemoteCertificateValidationCallback(AddressOf RemoteCertificateValidationCallback)
Private Function RemoteCertificateValidationCallback(ByVal sender As Object, _
ByVal cert As System.Security.Cryptography.X509Certificates.X509Certificate, _
ByVal chain As System.Security.Cryptography.X509Certificates.X509Chain, _
ByVal sslPolicyErrors As System.Net.Security.SslPolicyErrors) As Boolean
Return True
End Function
Sub RenderReport()
Dim rs As New SQLReportingService.ReportingService
Dim results As [Byte]() = Nothing
System.Net.ServicePointManager.ServerCertificateValidationCallback = callback
rs.Credentials = New System.Net.NetworkCredential("User", "Password", "Domain")
results = rs.Render(String.Concat("TargerFolder", "ReportName"), "PDF", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
Response.Clear()
Response.Buffer = True
Response.Expires = 0
Response.ContentType = "application/pdf"
Response.AppendHeader("Content-Disposition", "attachment; filename=Report.pdf")
Response.BinaryWrite(results)
Response.End()
End Sub
**********************************************************************************************************************************************
Does anyone see a problem with the above code. It has been in production for 3 weeks now and has been working fine until yesterday. Any help would be greatly appreciated!
No comments:
Post a Comment