webreference: how do I speed them up?
I am using some webrefernces for reporting services. The f开发者_JS百科irst 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:
- xml serialization
- Change the Reporting service recycle time (worth about 20 seconds on first report startup for me)
- 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>
e.g. 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. :)
精彩评论