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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Trust IssueTrust Issue
Previous
 
Next
New Post
8/11/2009 1:01 AM
 

I think I have a trust issue.......

I am updating an existing module that accept payments and moving it to DNN 5.1.1.  The gateway requires a call to their COM dll to process the payments.  When I run the following:

Dim objEMoney As EM2KEcom.SSCC
Try
    objEMoney = New EM2KEcom.SSCC '<<<<<< error occurs here >>>>>>>>>>
Catch ex As Exception
    Throw ex
End Try

I get the following error:

System.Security.Permissions.SecurityPermission
"Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."


If I run it in "FULL" trust, everything works fine.  If I run it in DNN 4.9, in Medium trust it works fine.

What can I do to solve this?

 
New Post
8/11/2009 10:36 AM
 

Hey Kyle,

You mentioned that if you run it in full trust it works fine - I'm assuming that is DNN 5.x? And then you said if you run it in DNN 4.9.x in medium trust it also works fine? That's a little confusing to me - when are you actually seeing the problem?

In the end - if you can run in full trust, you should. It's my understanding that this type of code will not function in medium trust. You can simply comment out the trust="medum" declaration in your web.config and use the code (unless your hosting provider enforces the use of medium trust).

Hope that helps,

Ian


Software Engineer
Co-Founder, dnnGallery
Stack Overflow: Ian Robinson
Twitter: @irobinson
Linked In: Ian Robinson
 
New Post
8/11/2009 12:15 PM
 

Kyle,

Ian is correct, COM objects require full trust - there is no difference between DotNetNuke versions, this is an asp.net code access security setting. Perhaps your 4.9 site is running under full, it can be set via machine.config as well as web.config . Please note, you mostly need to recycle the application pool after changing trust settings as asp.net needs to unload the application to rebuild the merged configuration.

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/11/2009 2:00 PM
 

Thanks for the replies.

But why would it work in one version of DNN and not in another version??

I'm running it on my development box right now.

DNN 4.9.0 --- runs fine in Medium Trust. (<trust level="Medium" originUrl=".*" />)
DNN 05.01.01 (98) --- does not work in Medium Trust.  It does work in Full Trust.

Any ideas?  Both versions would be be using the same machine.config since they are on the same machine.  I've recycled and rebooted.

Assuming that my host will allow full trust, are there any problems running in full trust?

 

 
New Post
8/12/2009 3:47 PM
 

Any ideas?

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Trust IssueTrust Issue


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