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 6: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 11:39 AM
 

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 2: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
DotNetNuke Trustee,
Senior Architect, DotNetNuke Coporation
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
See my Blog for Articles on .NET, DNN and Module Development

View my Blog
 
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.


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
Try An Online Demo
Download DotNetNuke 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

DotNetNuke Scoop!

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft .NET. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates Snowcovered.com where users purchase third party apps for the platform.