HomeHomeUsing DotNetNuk...Using DotNetNuk...Administration ...Administration ...Security Exception Following Installation of .Net v 4.5Security Exception Following Installation of .Net v 4.5
Previous
 
Next
New Post
8/31/2012 9:55 PM
 

I just installed VS 2012 RTM which also installs the in-place upgrade of .Net framework v 4.0 to v 4.5.  All of my DNN module development sites (DNN v 5.6.7, v 6.1.5 and v 6.2.2) running on IIS 7.5 that are associated with ASP.Net 4.0 application pools (integrated pipeline) now throw the following unhandled server error:

Security Exception
Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Stack Trace:

[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   Telerik.Web.UI.RadUploadHttpModule.CaptureWorkerRequest(Object sender, EventArgs e) +0
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929

If I change the Trust Level set in web.config from "Medium" to "Full" the error does not occur and each site appears to fuction as it did prior to the .Net 4.5 upgrade.

I've done extensive Google searches and checked the Telerik forums but have found no other mention of this requirement of elevating trust level for the Telerik RadUploadHttpModule following upgrade to ASP.Net 4.5.

Has anyone else run across this issue?


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer.
Coming Soon: By Invitation and FRBO-For Rent By Owner
 
New Post
9/1/2012 5:38 PM
 

Yes. I am seeing the same issue under a customized medium trust. Not sure of a fix at this point though unfortunately...

-Mike

 
New Post
9/1/2012 10:10 PM
 

So far all I can tell is that it seems to be something in ASP .NET 4.5 pipeline is throwing an exception whenever instantiating an object that inherits from HttpWorkerRequest. In the stacktrace you'll see the reference to Telerik.Web.UI.RadUploadHttpModule.CaptureWorkerRequest. This creates their "ProgressWorkerRequest" which inherits from System.Web.HttpWorkerRequest. Simply creating the object seems to trigger the exception, but still not sure why.

I was able to recreate the behavior via a simple implementation of IHttpModule and then in a simple ASP .NET web forms app. You can create your own type that inherits from HttpWorkerRequest have it implement the abstract class, then in your app simply create that type and you'll get the SecurityException. I also validated that this behavior does ~not~ occur pre-4.5.

-Mike

 
New Post
9/2/2012 4:26 PM
 

Adding UnmanagedCode flag to the SecurityPermission's IPermission flags seems to help.

Mike

 
New Post
9/5/2012 9:21 PM
 

Thanks, Mike, for your work in investigating this and reproducing the same error.

I just upgraded my DNN v 6.2.2 module development install to DNN v 6.2.3 which also updates Telerik.Web.UI.dll to v 2012.2.724.35. After changing the trust level from "Full" back to "Medium" in web.config the same security exception re-occurs. So, the Telerik.Web.UI assembly upgrade is of no help.

And, there's still no mention of this issue in the Telerik forums.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer.
Coming Soon: By Invitation and FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeUsing DotNetNuk...Using DotNetNuk...Administration ...Administration ...Security Exception Following Installation of .Net v 4.5Security Exception Following Installation of .Net v 4.5


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Start  Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke (DNN) provides a suite of solutions that make designing, building and managing feature-rich sites and communities fast, easy and cost-effective. The DotNetNuke Platform CMS is the foundation for more than one million websites worldwide. DNN Social, our newest solution, enables businesses to create immersive, interactive communities. Thousands of organizations like True Value Hardware, Bose, Cornell University, Glacier Water, Dannon, Delphi, USAA, NASCAR, Northern Health and the City of Denver have leveraged DNN to deploy highly engaging business- critical websites. Our rapid growth in product sales and deployments resulted in DotNetNuke Corp. being named one of the fastest growing private companies in America by Inc. Magazine in 2011 and 2012.