How can we update the object data source list without restarting the application?

1 Answer 84 Views
.NET Framework DataSource Object Report Designer - Web
OneDealer
Top achievements
Rank 1
OneDealer asked on 17 Nov 2022, 11:36 AM
Hiho!

We're using the telerik web report designer in a .net framework v4.7.2 asp.net mvc project.

We separated out data objects to a library project and then referenced it via the web.config. It works as intended, both in the designer and during data retrieval, but to update the dll with more objects we have to restart the whole site.

We tried using a folder other than bin with the probing attribute and still have issues with telerik caching and the application locking the assembly.

We also tried playing with AssemblyResolve and custom AppDomain, but it doesn't seem to be a valid solution.

We can override the ReportDesignerControllerBase.GetTypes method to return a generated type list on the fly, but that's only for displaying them to the web designer.

Is there any way to override something like the default ObjectInstanceDataSourceResolver, so we can generate dynamic types and handle cache lifetime by ourselves?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 22 Nov 2022, 09:47 AM

Hi,

Indeed, when the ObjectDataSource assembly is loaded once, you need to restart the application in order to update it to a newer version.

If I understood correctly, you would like to have something like what is explained in the Shadow Copying Assemblies, but for the assemblies that get loaded dynamically, as in the ObjectDataSource. We do not support this scenario though. There aren't methods exposed for overriding that will let you achieve the requirement.

I am not sure also whether the above functionality exists in .NET - check Self-update / shadow-copy with Asp.Net Core. Note that we try to keep the Web Designer and all our functionalities consistent among the frameworks we support.

We consider the requirement as a valid feature request and I have logged it and voted on your behalf - Allow substituting the ObjectDataSource and User Function assemblies without restarting the application. As a token of gratitude for raising this meaningful requirement, we have updated your Telerik points.

Note that we do not cache the custom assemblies. They get locked by the application when it loads them. Our code doesn't unload the assemblies, as the loading is an expensive operation. In the general scenario, we expect the custom assemblies to be used in multiple reports. Moreover, each rendering of the same report requires the data to be available. The report is rendered anew when you switch view modes, when printing, exporting or executing some Actions.

Currently, as a workaround, you may keep the data source that feeds the ObjectDataSource with data away from it, and use the ObjectDataSource as a proxy. This will let you substitute the data source without changing the assembly and restarting the site. For example, the data source may be a static CSV/JSON file, a database, a web service, etc.

Regards,
Todor
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Tags
.NET Framework DataSource Object Report Designer - Web
Asked by
OneDealer
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or