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
over the last two days, 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
********************************************************
A short term resolution has been to perform iisrest on the ReportServer.
However, the problem reappears later at random intervals.
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!Try running memtest: www.memtest.org. You may have bad memory.
"mjorangehawk" wrote:
> 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
> over the last two days, 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
> ********************************************************
> A short term resolution has been to perform iisrest on the ReportServer.
> However, the problem reappears later at random intervals.
> 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!
>|||Actually, it turns out the problem was related to a database image that was
being loaded into the report dynamically. The image control on the report
had a MIME type of jpg but we had a few cases of images that had been
inserted into the database as TIF's. Once we replaced those with JPG
versions the problem went away.
"breno" wrote:
> Try running memtest: www.memtest.org. You may have bad memory.
> "mjorangehawk" wrote:
> > 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
> > over the last two days, 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
> >
> > ********************************************************
> >
> > A short term resolution has been to perform iisrest on the ReportServer.
> > However, the problem reappears later at random intervals.
> >
> > 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!
> >
Thursday, March 29, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment