SQL Server Reporting Services:Web 引用与程序集引用,性能不佳 [英] SQL Server Reporting Services: web references vs assembly references, poor performance

查看:42
本文介绍了SQL Server Reporting Services:Web 引用与程序集引用,性能不佳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Reporting Services 将报告直接呈现为 PDF.它要求我使用两个 Web 引用:ReportExecution2005.asmxReportService2005.asmx.网络引用的性能似乎很差.由于我的 Web 服务器 (IIS7) 和我的 SQL Server (2008) 在同一个盒子上,有没有办法可以直接引用它们?如果没有,我有什么办法可以明确地缓存它们或其他东西.第一次加载真的很慢,第二次加载完全可以接受.

I am using Reporting Services to render a report directly to PDF. It requires that I use two web references: ReportExecution2005.asmx and ReportService2005.asmx. The performance on web references seems really poor. Since my web server (IIS7) and my SQL Server (2008) are on the same box, is there a way I can reference them directly? If not is there any way I can explicitly cache them or something. First load is really really slow, second load is perfectly acceptable.

谢谢

推荐答案

解决这个问题需要做两件事:

Two things need to be done to solve this issue:

  1. xml 序列化
  2. 更改报告服务回收时间(对我来说第一次报告启动时大约需要 20 秒)
  3. 更改 IIS 中的应用程序池回收时间(对我来说,第一次报告启动时大约需要 5 秒)
  1. xml serialization
  2. Change the Reporting service recycle time (worth about 20 seconds on first report startup for me)
  3. Change the application pool recycle time in IIS (worth about 5 seconds on first report startup for me)

作为 xml 序列化的旁注,在某些情况下,上述设置实际上并未向您的程序集添加任何内容.您可以通过在项目目录中打开命令行并输入 wsdl 来添加 web 代理类./out<代理类名> 例如wsdl http://myworkstn:8080/ReportServer_SQLEXPRESS/ReportExecution2005.asmx/out: ReportExecutionProxy.cs.

As a side note on the xml serialization there are instances where the setting above does not actually add anything to your assembly. You can add web proxy classes by opening a commandline in your project dir and enter wsdl <web service name> /out<proxy class name> e.g. wsdl http://myworkstn:8080/ReportServer_SQLEXPRESS/ReportExecution2005.asmx /out: ReportExecutionProxy.cs.

然后添加构建后事件(Solution Explorer | Rt 点击项目 | Properties | Build Events (Tab) | Post –build 事件命令行(部分))"$(FrameworkSDKDir)Bin\sgen.exe"/force/assembly:"$(TargetPath)"/proxytypes/parsableerrors /proxytypes 开关只添加代理类

Then add a post build event (Solution Explorer | Rt Click on Project | Properties | Build Events (Tab) | Post –build event command line (section)) "$(FrameworkSDKDir)Bin\sgen.exe" /force /assembly:"$(TargetPath)" /proxytypes /parsableerrors The /proxytypes switch only adds the proxy classes

希望这可以为您节省我找到所有这些的时间.:)

Hope this saves you the hours it took me to find all this. :)

这篇关于SQL Server Reporting Services:Web 引用与程序集引用,性能不佳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆