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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Request for ConfigurationPermission failed while attempting to access configuration section Request for ConfigurationPermission failed while attempting to access configuration section 'system.
Previous
 
Next
New Post
1/28/2008 9:39 AM
 

I have a problem with a new 4.8 installation.  When I try to view a page it just keeps on redirecting to the same page.

There's a couple of things going wrong here.

1) Whoever wrote this construct should be one of the first against the wall.  Check it out (PageBase.vb:529):

            If objBasePortalException.Message.Contains("System.Web.Extensions") Then
                ' suppress AJAX error in Medium Trust
                Response.Redirect(strURL)
            Else
                blah(blah)

 

 What does "suppress AJAX error in Medium Trust" mean?  Are you sure this isn't going to match any other error and hence make it impossible for anyone to actually find out what's going on?  I suggest it should be changed to something more reasonable (or removed entirely).

2) The exception i'm getting is below.  Any ideas what it means?  Sounds like my computer doesn't trust me.

Colin

 

 System.Security.SecurityException: Request for ConfigurationPermission failed while attempting to access configuration section 'system.web/deployment'. To allow all callers to access the data for this section, set section attribute 'requirePermission' equal 'false' in the configuration file where this section is declared. ---> System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.
   at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
   at System.Security.CodeAccessPermission.Demand()
   at System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Configuration.ConfigurationPermission
The first permission that failed was:
<IPermission class="System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Unrestricted="true"/>

The demand was for:
<IPermission class="System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Unrestricted="true"/>

The granted set of the failing assembly was:
<PermissionSet class="System.Security.PermissionSet"
version="1">
<IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Read="TEMP;TMP;USERNAME;OS;COMPUTERNAME"/>
<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Read="C:\Dev\dnn\branches\custom\Website"
Write="C:\Dev\dnn\branches\custom\Website"
Append="C:\Dev\dnn\branches\custom\Website"
PathDiscovery="C:\Dev\dnn\branches\custom\Website"/>
<IPermission class="System.Security.Permissions.IsolatedStorageFilePermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Allowed="AssemblyIsolationByUser"
UserQuota="9223372036854775807"/>
<IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Flags="RestrictedMemberAccess"/>
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Flags="Assertion, Execution, ControlThread, ControlPrincipal, RemotingConfiguration"/>
<IPermission class="System.Security.Permissions.PublisherIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
X509v3Certificate="...[moderator: removed]..."/>
<IPermission class="System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
PublicKeyBlob="...[moderator: removed]..."
Name="System.Web.Extensions"
AssemblyVersion="1.0.61025.0"/>
<IPermission class="System.Security.Permissions.UrlIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Url="file:///C:/Dev/dnn/branches/custom/Website/bin/System.Web.Extensions.DLL"/>
<IPermission class="System.Security.Permissions.ZoneIdentityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Zone="MyComputer"/>
<IPermission class="System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Level="Medium"/>
<IPermission class="System.Net.DnsPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Unrestricted="true"/>
<IPermission class="System.Drawing.Printing.PrintingPermission, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Level="DefaultPrinting"/>
<IPermission class="System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Access="Connect"/>
<IPermission class="System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1"
Unrestricted="true"/>
<IPermission class="System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=...[moderator: removed]..."
version="1">
<ConnectAccess>
<URI uri=".*"/>
</ConnectAccess>
</IPermission>
</PermissionSet>

The assembly or AppDomain that failed was:
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=...[moderator: removed]...
The method that caused the failure was:
Boolean GetRetailFromConfig()
The Zone of the assembly that failed was:
MyComputer
The Url of the assembly that failed was:
file:///C:/Dev/dnn/branches/custom/Website/bin/System.Web.Extensions.DLL
   --- End of inner exception stack trace ---
   at System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca)
   at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
   at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
   at System.Web.Configuration.WebConfigurationManager.GetSection(String sectionName)
   at System.Web.UI.DeploymentSectionCache.GetRetailFromConfig()
   at System.Web.UI.DeploymentSectionCache.get_Retail()
   at System.Web.UI.ScriptManager.get_DeploymentSectionRetail()
   at System.Web.UI.ScriptReference.IsDebuggingEnabled(ScriptManager scriptManager)
   at System.Web.UI.ScriptReference.ShouldUseDebugScript(String releaseName, Assembly assembly, ScriptManager scriptManager)
   at System.Web.UI.ScriptReference.GetResourceName(String releaseName, Assembly assembly, ScriptManager scriptManager)
   at System.Web.UI.ScriptReference.GetUrlFromName(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip)
   at System.Web.UI.ScriptReference.GetUrl(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip)
   at System.Web.UI.ScriptManager.RegisterScripts()
   at System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e)
   at System.Web.UI.Page.OnPreRenderComplete(EventArgs e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The Zone of the assembly that failed was:
MyComputer"    String

 
New Post
1/28/2008 2:39 PM
 

Ok, I got a solution if anyone cares.....install ASP.NET AJAX this seems to fix it although I still consider the behaviour of DNN to be quite broken in this regard.  Peace.

 
New Post
4/11/2008 4:12 PM
 

The reason why this code was added - and I agree its not very elegant, is to support people who were not able to Install AJAX in the GAC.

The issue was (and still is to a degree) this.

In order for AJAX to work in Medium Trust (which MS is encouraging Hosters to use) AJAX must be installed in the GAC.

So we have a potential Catch-22 here.

  1. MS recommends Hosters use Medium Trust for security
  2. AJAX is required to be in the GAC if running under Medium Trust
  3. Users with Shared Hosting Accounts cannot install assemblies into the GAC
  4. Hosting providers do not usually install new software on existing boxes (thus they will not support AJAX upgrades on olders ASP.NET accounts)

As module developers were implementing AJAX modules users were screaming for a way to use AJAX, so we allow users to put the assembly in the bin (which requires full trust).

Its not pretty, but it meets the needs of most people.

With the release of Cambrian, we will no longer support AJAX in the \bin.

And BTW - a better attitude in your posts would probably lead to a quicker response.  Insulting the volunteers on the project is not conducive to them responding favourably.

 


Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Request for ConfigurationPermission failed while attempting to access configuration section Request for ConfigurationPermission failed while attempting to access configuration section 'system.


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