简体   繁体   中英

webreference: how do I speed them up?

I am using some webrefernces for reporting services. The first time they load they are really really slow. Is there any way to reference the files locally?

If those references are not getting hit frequently then it's likely just compile time on the server for the initial hit. You should be able to change the settings in IIS to not recycle the application after a short period of time. You could also set up some kind of "keep-alive" for the service.

Two things need to be done to solve this issue:

  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)

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> eg wsdl http://myworkstn:8080/ReportServer_SQLEXPRESS/ReportExecution2005.asmx /out: ReportExecutionProxy.cs .

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. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM