Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUsing RESX in medium trust?Using RESX in medium trust?
Previous
 
Next
New Post
3/19/2010 4:37 PM
 

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

 

 
New Post
3/20/2010 11:40 AM
 
Interesting idea. To be honest I'm not seeing any good solutions off the top of my head though I suggest you raise your request as an enhancement request at support.dotnetnuke.com , so it could be considered. I haven't looked at Brandon's code to see if the full trust requirement could be worked around, but you could add the allow partially trusted callers attribute (APTCA) and deploy it to the GAC to allow for it to work in partial trust. Obviously not all users have GAC access so this is sub-optimal. Cathal

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
3/30/2010 10:56 AM
 

Thanks for the feedback. I created an enhancement request.

Roger

 
New Post
3/30/2010 11:18 AM
 
thanks - as I think this is an interesting/potentially important enhancement I've forwarded the details onto the architecture team so they can discuss it at their next product meeting.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUsing RESX in medium trust?Using RESX in medium trust?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out