I am taking an existing web application (open source Gallery Server Pro) and branching the source code into a DNN module. The web app uses standard .NET RESX functionality. For example, it accesses resources like this:
In an ASPX page: <asp:Literal ID="l1" runat="server" Text="<%$ Resources:GalleryServerPro, Admin_Tab_Hdr %>" />
In code-behind: string msg = Resources.GalleryServerPro.Successfully_Restored_Msg;
This appraoch does not work in DNN since DNN disables the RESX build provider in web.config. I can get it working by using Brandon Hayes' resx build provider but this only works in Full Trust.
It is not an option to convert the code to the "DNN way" since that will require thousands of updates to the code and I am trying to preserve a common code base between the stand-alone and module versions.
In short, how can I get my resources working in medium trust without rewriting my architecture? I tried compiling the resources directly into the DLL or a satellite assembly but don't think this is possible (unlike a class library, where it *is* possible).
1. Any way to compile the RESX resources so I don't need to distribute the RESX file?
2. Any way to get Brandon's build provider working in medium trust?
3. Any way to implement the adapter pattern where a "shim" can be used to translate the original request into a DNN-formatted one?
4. Any other option?
I am at my wits end...
Regards,
Roger Martin
Creator and Lead Developer
Gallery Server Pro - Open Source Web Gallery