Developer forum

Forum » Dynamicweb 10 » Local Addin not pickedup and "scramled" after AppPool recycle

Local Addin not pickedup and "scramled" after AppPool recycle

Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

Hi, 

I have a template that uses CsvExport https://www.nuget.org/packages/CsvExport 

I installed the CsvExport dll via the dw CLI, and also did a manual upload and install, which is showing some weird behaviour. Either way the template give an error that Csv and CsvExport are not recognized after install. Also after recycling the AppPool. I attached a test version of a template using the CsvExport. 

When I drop the dll in the bin folder of the dw10 admin application, the template does work. (I have configured it as the detail template of a Customer Experience Center app, allowing the user to download a csv of an order)

In this screencast you can see that, after I uploaded the dll to the Addins\Local folder, its seems to install correctly. At that point the template does not work (not part of the screencast),  and if I Recycle the AppPool there is something wrong with the listing of the dll, showing the assembly name and version concatenated (partly), and the version and installed badge are missing:

https://screenrec.com/share/CRxOsaD0uj

Let me know if you need additional info...

Justin


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Justin,

This is caused by the same issue we discussed here: https://doc.dynamicweb.com/forum/development/development/debugging-no-symbols-loaded-for-compiled-razor-files

Because RazorEngine is unaware of the method we use to load assemblies dynamically, it cannot use them. Therefore, all custom/appstore functionality is currently not usable from templates. The only workaround to this is to add the assemblies to the bin folder directly, but this is only possible in hosting environments that you control. It's not possible to do this workaround in DW Cloud.

You could make a UI action to download the CSV instead. That way you don't run into the issue with templates. It would also be a better solution as it would allow you to stream the result to the response instead of creating it all in memory and then flushing it. This is especially beneficial for large results.

As mentioned in the other thread, we are working to remedy the issue, but I have no solution to share at the moment.

- Jeppe

 

You must be logged in to post in the forum