在 Win7 x64 上的 IIS 7.5(启用 32 位应用程序)上使用 Oracle ODAC11.2.0.1.0 使用来自 ASP.NET 应用程序的 SSRS 2008R2 x64 报告
在我的开发计算机(Win7 x64、IIS 7.5、SSRS 2008R2 x64)上,我有一个 ASP.Net 应用程序(“启用 32 位应用程序”设置为“True”的应用程序池)使用 Oracle Data 连接到 Oracle 数据库服务器.Net 32 位的提供程序(ODAC 11.2.0.1.0、Oracle.DataAccess 2.112.1.0.)。 IIS 7.5 和 SSRS 2008 R2 在同一台开发计算机上运行。 Oracle 在测试服务器上运行。
它工作正常,除了当我使用 ReportViewer 嵌入来自 SSRS 2008 R2 的报告时,如下所示:
reportViewer.ProcessingMode = ProcessingMode.Remote
reportViewer.ServerReport.ReportServerCredentials = New ReportServerCredentials()
Dim serverReport As ServerReport
serverReport = reportViewer.ServerReport
serverReport.ReportPath = "/" + ReportServerCredentials.ReportFolder + "/rptParteIngreso"
serverReport.ReportServerUrl = New Uri(ReportServerCredentials.urlServerReporting)
Dim parameters() As ReportParameter = {P_IDPAIS, P_FECHAINICIO, P_FECHAFIN, P_NROPARTE, P_FLAGAPROBING}
Try
serverReport.SetParameters(parameters)
Catch ex As Exception
MessageBoxs.Show(ex.InnerException.ToString())
End Try
它抛出以下错误:
Microsoft.Reporting.WebForms.ReportServerException was unhandled by user code
ErrorCode=rsProcessingAborted
Message=Error al procesar el informe. (rsProcessingAborted)
Source=Microsoft.ReportViewer.WebForms
StackTrace:
en Microsoft.Reporting.WebForms.ServerReportSoapProxy.OnSoapException(SoapException e)
en Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
en Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.SetExecutionParameters(ParameterValue[] Parameters, String ParameterLanguage)
en Microsoft.Reporting.WebForms.ServerReport.SetParameters(IEnumerable`1 parameters)
.....
en System.Web.UI.Control.OnLoad(EventArgs e)
en System.Web.UI.Control.LoadRecursive()
en System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
ErrorCode=rsErrorOpeningConnection
Message=Cannot create a connection to data source 'DSRRHH'. (rsErrorOpeningConnection)
InnerException: Microsoft.Reporting.WebForms.ReportServerException
Message=El intento de cargar las bibliotecas de clientes de Oracle lanzó BadImageFormatException. **Este problema ocurrirá al ejecutar el modo 64 bits con los componente cliente de Oracle de 32 bits instalados**.
InnerException: Microsoft.Reporting.WebForms.ReportServerException
Message=Se ha intentado cargar un programa con un formato incorrecto. (Excepción de HRESULT: 0x8007000B)
我认为相关消息是“在 32 位模式下以 64 位模式运行时会出现此问题安装了位 Oracle 客户端组件。”
此外,在任务管理器上,我检查了 Reporting Services 是否作为 64 位进程运行 (ReportingServicesService.exe),并且我的应用程序正在运行32 位(w3wp.exe *32)。
然而,在设计报告时,使用“.Net Framework Data Provider for Oracle”,我认为它是由微软提供的,它工作正常。
因此,我的结论是我的 ASP.Net 应用程序(以 32 位运行)和我在 SSRS 2008 R2 x64 服务器上发布的报告之间存在冲突。
所以,我的问题是,如何将这些 SSRS 报告嵌入到我的 ASP.Net 应用程序中?
我想到的一些替代方案:
- 在 IIS 上的应用程序池上禁用“启用 32 位应用程序”,这样它将以 64 位运行。
- 将 SSRS 进程更改为以 32 位运行。 (这可能吗?)
此外,我已将报告发布到另一台服务器(Win 2008 R2 x64 上的 SSRS 2008 R2 x64),并且我可以毫无问题地从我的开发计算机上的 ASP.Net 32 位应用程序嵌入它们。
任何帮助将不胜感激。
On my development machine (Win7 x64, IIS 7.5, SSRS 2008R2 x64), I have an ASP.Net app (application pool with "Enable 32-bit apps" set to "True") connecting to an Oracle database server, using Oracle Data Provider for .Net 32 bits (ODAC 11.2.0.1.0, Oracle.DataAccess 2.112.1.0.).
IIS 7.5 and SSRS 2008 R2 run on the same development machine.
Oracle runs on a test server.
It works fine, except when I embed a report from SSRS 2008 R2, using ReportViewer, like this:
reportViewer.ProcessingMode = ProcessingMode.Remote
reportViewer.ServerReport.ReportServerCredentials = New ReportServerCredentials()
Dim serverReport As ServerReport
serverReport = reportViewer.ServerReport
serverReport.ReportPath = "/" + ReportServerCredentials.ReportFolder + "/rptParteIngreso"
serverReport.ReportServerUrl = New Uri(ReportServerCredentials.urlServerReporting)
Dim parameters() As ReportParameter = {P_IDPAIS, P_FECHAINICIO, P_FECHAFIN, P_NROPARTE, P_FLAGAPROBING}
Try
serverReport.SetParameters(parameters)
Catch ex As Exception
MessageBoxs.Show(ex.InnerException.ToString())
End Try
It throws the following error:
Microsoft.Reporting.WebForms.ReportServerException was unhandled by user code
ErrorCode=rsProcessingAborted
Message=Error al procesar el informe. (rsProcessingAborted)
Source=Microsoft.ReportViewer.WebForms
StackTrace:
en Microsoft.Reporting.WebForms.ServerReportSoapProxy.OnSoapException(SoapException e)
en Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
en Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.SetExecutionParameters(ParameterValue[] Parameters, String ParameterLanguage)
en Microsoft.Reporting.WebForms.ServerReport.SetParameters(IEnumerable`1 parameters)
.....
en System.Web.UI.Control.OnLoad(EventArgs e)
en System.Web.UI.Control.LoadRecursive()
en System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
ErrorCode=rsErrorOpeningConnection
Message=Cannot create a connection to data source 'DSRRHH'. (rsErrorOpeningConnection)
InnerException: Microsoft.Reporting.WebForms.ReportServerException
Message=El intento de cargar las bibliotecas de clientes de Oracle lanzó BadImageFormatException. **Este problema ocurrirá al ejecutar el modo 64 bits con los componente cliente de Oracle de 32 bits instalados**.
InnerException: Microsoft.Reporting.WebForms.ReportServerException
Message=Se ha intentado cargar un programa con un formato incorrecto. (Excepción de HRESULT: 0x8007000B)
The relevant message I think is "This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed."
Also, on the Task Manager, I've checked Reporting Services is running as a 64-bit process(ReportingServicesService.exe) and my app is running on 32 bits (w3wp.exe *32).
However, when designing the report, it works OK, using ".Net Framework Data Provider for Oracle", which I think is provided by Microsoft.
So, my conclusion is there's a conflict between my ASP.Net app (running as 32-bit) and my reports published on a SSRS 2008 R2 x64 server.
So, my question is, how can I embed those SSRS reports in my ASP.Net app?
Some alternatives I've thought:
- Diable "Enable 32-bit apps" on application pool on IIS, so it will run as 64-bits.
- Change SSRS process to run as 32-bits. (Is this even posible?)
Also, I've published the reports to another server (SSRS 2008 R2 x64 on Win 2008 R2 x64) and I can embed them without any problem from my ASP.Net 32-bits app on my development machine.
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决了。
安装了 Oracle Data Provider for .Net 64 位(ODAC 11.2.0.1.0、Oracle.DataAccess 2.112.1.0.)并在 IIS 上的应用程序池上禁用了“启用 32 位应用程序”,因此它将作为 64 位运行。
这样,它就可以连接到SSRS 2008 R2 64位
Solved.
Installed Oracle Data Provider for .Net 64 bits (ODAC 11.2.0.1.0, Oracle.DataAccess 2.112.1.0.) and disabled "Enable 32-bit apps" on application pool on IIS, so it will run as 64-bits.
This way, it can connects to SSRS 2008 R2 64 bits