Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suggested lifecycle for SSRS web proxy

I make use of the SQL Server Reporting Service's web services api to render reports using the ReportExecutionService proxy in an asp.net web application.

My question is: should I be creating a new instance of the ReportExecutionService proxy each time I generate a report, or is using a singleton instance the recommended approach? (eg. for performance reasons, etc).

like image 449
DanP Avatar asked Nov 02 '22 05:11

DanP


1 Answers

What wcf bindings you are going to use? In general - you can reuse proxy, and in single-user single thread application it is a good idea.

But singleton is a bad idea in ASP.NET application - by itself proxies are not thread-safe.

Therefore, you can create proxy and cache it on session layer (is one session = one thread, as I remember this is configurable in ASP.NET).

like image 146
Roman Pokrovskij Avatar answered Nov 15 '22 07:11

Roman Pokrovskij