报告服务2008:ReportExecution2005.asmx不存在

Shi*_*rod 1 reporting-services ssrs-2008

我正在尝试直接从代码生成报告(之后通过邮件发送).我在Windows服务中做到这一点.

所以这就是我正在做的事情:

Dim rview As New ReportViewer()

Dim reportServerAddress As String = "http://server/Reports_client"
rview.ServerReport.ReportServerUrl = New Uri(reportServerAddress)

Dim paramList As New List(Of Microsoft.Reporting.WinForms.ReportParameter)
paramList.Add(New Microsoft.Reporting.WinForms.ReportParameter("param1", t.Value))
paramList.Add(New Microsoft.Reporting.WinForms.ReportParameter("CurrentDate", Date.Now))

Dim reportsDirectory As String = "AppName.Reports"
Dim reportPath As String = String.Format("/{0}/{1}", reportsDirectory, reportName)

rview.ServerReport.ReportPath = reportPath
rview.ServerReport.SetParameters(paramList) 'This is where I get the exception

Dim mimeType, encoding, extension, deviceInfo As String
Dim streamids As String()
Dim warnings As Microsoft.Reporting.WinForms.Warning()

deviceInfo = "<DeviceInfo><SimplePageHeaders>True</SimplePageHeaders></DeviceInfo>"

Dim format As String = "PDF"

Dim bytes As Byte() = rview.ServerReport.Render(format, deviceInfo, mimeType, encoding, extension, streamids, warnings)
Run Code Online (Sandbox Code Playgroud)

调试这段代码时,我可以看到它抛出一个MissingEndpointExceptionSetParameters(paramList)用这条消息做的地方:

尝试连接到报表服务器失败.检查连接信息,并且报表服务器是兼容版本.

查看服务器的日志文件,我可以看到:

ui!ReportManager_0-8!878!06/02/2010-11:34:36 ::未处理的异常:System.Web.HttpException:文件'/Reports_client/ReportExecution2005.asmx'不存在.System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context)上的System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath,Boolean noBuild,Boolean allowCrossApp,Boolean allowBuildInPrecompile)中的System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) ,VirtualPath virtualPath,Boolean noBuild,Boolean allowCrossApp,Boolean allowBuildInPrecompile)在System.Web.Compilation的System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context,VirtualPath virtualPath,Boolean noBuild,Boolean allowCrossApp,Boolean allowBuildInPrecompile).
System.Web.HttpApplication.MapHttpHandler上的System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext上下文,String verb,String url,String filePath)中的System.Web.UI.WebServiceParser.GetCompiledType(String inputFile,HttpContext context) (HttpContext context,String requestType,VirtualPath path,String pathTranslated,Boolean useAppConfig)System.Web.HttpApplication.ExecuteStep(IExecutionStep step,Boolean&completedSynchronously)上的System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() )

我没有在网上找到适合我的问题的任何资源.有人有线索吗 ?我能够从Web应用程序查看报告,所以我确定服务器正在运行.

提前致谢.

Shi*_*rod 8

没关系,我对服务器名称感到困惑......

而不是使用

http://server/Reports_client

,我只需要使用

http://server/ReportServer_client