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...Upgrading DNN P...Upgrading DNN P...6.0.0 to 6.1.0 EnvironmentPermission Error6.0.0 to 6.1.0 EnvironmentPermission Error
Previous
 
Next
New Post
12/13/2011 9:51 AM
 
hosting my website under very known provider, got the same error when upgrading to 6.1.1

[SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +61
System.Environment.get_MachineName() +66
ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper.GetXmlMapPath() +31
ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper.Initialize(HttpContextBase http) +114
ClientDependency.Core.Config.ClientDependencySettings.LoadDefaultFileMapConfig(ClientDependencySection section, HttpContextBase http) +124
ClientDependency.Core.Config.ClientDependencySettings.LoadProviders(ClientDependencySection section, HttpContextBase http) +411
ClientDependency.Core.Config.ClientDependencySettings..ctor() +94
ClientDependency.Core.Config.ClientDependencySettings.get_Instance() +78
ClientDependency.Core.Module.ClientDependencyModule.LoadFilterTypes() +37
ClientDependency.Core.Module.ClientDependencyModule.System.Web.IHttpModule.Init(HttpApplication app) +55
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +406
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +188
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +295
System.Web.HttpApplicationFactory.GetPipelineApplicationInstance(IntPtr appContext, HttpContext context) +56
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +231

Looks like problem is under getMachineName()
come on I can not ask MachineName when it is not mine, but providers one...

Will it be fixed?
When?
 
New Post
12/13/2011 9:57 AM
 

same error here when upgrading to 6.1.1, is it posssible to ask GetMachineName if server is not yours but prviders one

 
New Post
12/14/2011 9:48 AM
 

Since 6.1.0 DNN Uses the Client Dependency Framework (http://clientdependency.codeplex.com/) which is great, but is uses System.Environment.MachineName. This requires EnvironmentPermission, which I don't have on my hosting machine.

But why does DNN has the name in the Host Settings Dashboard? Because DNN Uses System.Net.Dns.GetHostName().

Don't upgrade if you run in a Medium Trust environment. Just put this in a testpage (TestSecurity.aspx) and put in on your host machine to make sure your host has the right permissions:

 <%@ Page Language="C#" AutoEventWireup="true" %>
<script runat="server">
  protected void Page_Load(object sender, EventArgs e){
     try{
        this.Controls.Add(new LiteralControl(System.Environment.MachineName));
     }catch (Exception exc)
     {
         this.Controls.Add(new LiteralControl(exc.Message));
     }
   }
</script>

 
New Post
12/14/2011 3:00 PM
 

I've done a bit of testing myself and asking around and I've found that the EnvironmentPermission needed is actually granted by default in a Medium Trust environment. So at this point I believe if you're experiencing issues with this particular permission - it may be because your hosting provider has a custom configuration set up that restricts this permission.

What hosting provider is everyone using?


Software Engineer
Co-Founder, dnnGallery
Stack Overflow: Ian Robinson
Twitter: @irobinson
Linked In: Ian Robinson
 
New Post
12/15/2011 4:18 AM
 

I am using 1and1  (.com)

and I think it is in Medium trust already (but I am not sure) will investigate and let U know asap

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...6.0.0 to 6.1.0 EnvironmentPermission Error6.0.0 to 6.1.0 EnvironmentPermission Error


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