Creating a DNN3 Module.

Posts   
 
    
Rushmore
User
Posts: 125
Joined: 27-Jan-2005
# Posted on: 31-Oct-2005 11:27:07   

Hi,

I am evaluating llbgen. DataAccess works fine with windows application, windows services, and console application.

Now I am running into a deep hole of problems:

What about web applications especially DNN3?

I got security exceptions with at least one line of code (line 33), without that line my module comes up.

Line 31: try Line 32: { Line 33: DataAccessAdapter adapter = new DataAccessAdapter(DotNetNuke.Common.Globals.GetDBConnectionString()); Line 34: // TODO: Remove sample code and make your own implementation Line 35: if (!Page.IsPostBack)

The trust level of DNN3 ist set to "Medium". I am googled around the world and all I found is, that LLBLGEN uses reflection and in "Medium" trust level reflection is not allowed.

Any suggestions?

Regards, Carlo

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 02-Nov-2005 08:34:57   

Instantiating a DataAccessAdapter instance doesn't use reflection so I'm a bit at a loss why you get the exception there. Reflection is only used in SaveTransaction() and in the ReadXml routines.

LLBLGen Pro is used by a lot of users with DNN, so it's not as if it's not possible, though it might be the trustlevel is indeed the problem, as somewhere in the assembly there is reflection.

Frans Bouma | Lead developer LLBLGen Pro
Rushmore
User
Posts: 125
Joined: 27-Jan-2005
# Posted on: 02-Nov-2005 11:18:32   

Otis wrote:

LLBLGen Pro is used by a lot of users with DNN, so it's not as if it's not possible, though it might be the trustlevel is indeed the problem, as somewhere in the assembly there is reflection.

That Sounds good, but can somebody help me? There must be a solution out there, right? I have changed the trust level to full, but then I am out of luck with DNN!

A naked webapp (outside of DNN) works fine.

Tips, tricks etc. are appreciated.

Regards, Carlo

P.S. Somewhen you wrote, you can order two beer in german simple_smile We solve that problem and I send you a sixpack from germany. What do you think?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 03-Nov-2005 11:52:29   

Rushmore wrote:

Otis wrote:

LLBLGen Pro is used by a lot of users with DNN, so it's not as if it's not possible, though it might be the trustlevel is indeed the problem, as somewhere in the assembly there is reflection.

That Sounds good, but can somebody help me? There must be a solution out there, right? I have changed the trust level to full, but then I am out of luck with DNN!

Hmm. You can't run DNN in a full trust level? That's odd. You can also try to add the ormsupportclasses to the GAC and define these as trustlevel full.

P.S. Somewhen you wrote, you can order two beer in german simple_smile We solve that problem and I send you a sixpack from germany. What do you think?

Deal simple_smile Though trustlevel requirements in 3rd party apps are of course out of my hands. I'll see if it can be solved. I'm sure others had the same problem with DNN.

(edit) probably solution link 1 probably solution link 2

Frans Bouma | Lead developer LLBLGen Pro