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 ...Dotnetnuke 3.1 - Request for the permission of type System....FileIOPermission failed problemDotnetnuke 3.1 - Request for the permission of type System....FileIOPermission failed problem
Previous
 
Next
New Post
7/26/2007 4:27 AM
 

 

We have built a huge application built using DNN 3.1.0. It has been running quite well from last 1.5 yrs on .Net 1.1 SP 1
But lately we have increased data and users on our application. Certain modules are heavily accessed and hence more failures there.
Erratically now days we are getting following error on the website. The frequency of this error has increased a lot.
Searched a lot but could nto find much help into this.

[SecurityException: Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.]
   System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken) +675
   System.Security.CodeAccessSecurityEngine.Check(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride) +0
   System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +88
   System.Security.CodeAccessPermission.Demand() +62
   System.Reflection.Assembly.get_Location() +59
   System.Web.Configuration.HttpConfigurationSystemBase.get_MsCorLibDirectory() +26
   System.Web.Hosting.ISAPIWorkerRequest.get_MachineConfigPath() +5
   System.Web.Configuration.HttpConfigurationSystem.ComposeConfig(String reqPath, IHttpMapPath configmap) +386
   System.Web.HttpContext.GetCompleteConfigRecord(String reqpath, IHttpMapPath configmap) +434
   System.Web.HttpContext.GetCompleteConfig() +49
   System.Web.HttpContext.GetConfig(String name) +195
   System.Web.Configuration.HttpConfigurationSystemBase.System.Configuration.IConfigurationSystem.GetConfig(String configKey) +22
   System.Configuration.ConfigurationSettings.GetConfig(String sectionName) +192
   System.Configuration.ConfigurationSettings.get_AppSettings() +16
   DotNetNuke.Common.Utilities.DataCache.get_CachePersistenceEnabled()
   DotNetNuke.Services.Cache.FileBasedCachingProvider.FBCachingProvider.Insert(String CacheKey, Object objObject, Boolean PersistAppRestart) +60
   DotNetNuke.Common.Utilities.DataCache.SetCache(String CacheKey, Object objObject, Boolean PersistAppRestart)
   DotNetNuke.Common.Utilities.DataCache.SetCache(String CacheKey, Object objObject)
   DotNetNuke.Entities.Host.HostSettings.GetHostSettings()
   DotNetNuke.Common.Globals.get_HostSettings()
   DotNetNuke.Services.Exceptions.Exceptions.ProcessPageLoadException(Exception exc, String URL)
   DotNetNuke.Framework.PageBase.Page_Error(Object Source, EventArgs e)
   System.Web.UI.TemplateControl.OnError(EventArgs e) +109
   System.Web.UI.Page.HandleError(Exception e) +68
   System.Web.UI.Page.ProcessRequestMain() +2162
   System.Web.UI.Page.ProcessRequest() +218
   System.Web.UI.Page.ProcessRequest(HttpContext context) +18
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +179
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87

Note -
We have optimized our database indexes, deframeneted them, reindexed them.
Application is running on webfarm
For some our custom modules we have more than normal use of Reflection for intermodule communication.
Application is running on Medium trust.
We cannot upgrade our application to next version of DNN unless there is no other way out.

Our Analysis -
All the failures indicate access to "System.Reflection.Assembly.get_Location".
DNN uses reflection heavily for it DataProvider architecture.

Is the problem to do with heavy usage of Reflection?
Should we strong type the assemblies?
I read DNN 4 has some trust related issues beacuse of certain changes in .Net 2.0. Does 3.1 also has anything like that.

The issue is very critical for us to resolve

 
New Post
7/26/2007 6:06 AM
 

All of my experience has been with DNN 4 on .NET 2 in Medium Trust. However, whenever I see the error: "System.Security.Permissions.FileIOPermission" it has always been related to Medium Trust for a particular module.

Either the module is asking for permission(s) it does not need, or it is trying to access the file system outside of the DNN installation folder tree.

Microsoft released .NET security updates this month for both .NET 1 and .NET 2, so perhaps that update has caused your sudden increase in issues. I know it broke some modules under .NET 2 on DNN 4.3+, but not due to FileIOPermissions, to my knowledge. It may be worth a call to Microsoft PSS since it sounds like you are developing a lot of your own code. I am not a developer, but from my research into Medium Trust and Code Access Security, strong typing your assemblies may be the answer if they need to be trusted to have more flexibility in a Medium Trust environment.

 


Rob Ralston, SilverBullet Technologies LLC, www.silverbullettech.com
 
New Post
7/26/2007 6:19 AM
 

Thanks Rob.
Our problem is not because of security updates as we have seen these on different configuration with similar frequency pattern.
Also our application does not use any file system, its all DB driven.
When it says FileIOPermissions, probably it is failure to access certain assemblies or something.
Last couple of days I am thinking that Reflection is culprit since it is runtime execution.

Strong typing may resolve problems if reflection is culprit.

DNN team must have observed these problems themselves because 3.1 is quite old version and now DNN has moved ahead a lot. But I did not find any documentation where DNN team has listed down what kind of performace issues were found and rectified. This kind of information would be very helpful to people like us who cannot upgrade to newer version as we have build on our own application with DNN 3.1 at foundation.

 
New Post
8/1/2007 9:25 PM
 

Hmmm... I am having a very similar problem (although not identical) on a DNN v4.x (I think it is 4.3, but the error is actually preventing me from seeing some stuff, like my Host Settings page).  I did not worry about it at first because it occurs on a dev server where we are experimenting with portal import>export stuff (migrating a v3 to a v4, etc), so I have several failed v3 installations and such on this machine in various directories... I assumed that the error (pasted below) was just because we messed up the machine, but now I am not so sure.  Anyway, here are the details of my error - I'll dig a little and see if I can solve the problem.  Some additional notes, below... please let me know if this is on track with what you are seeing.

Regards,

-- JTS<><

------------ Notes ---------------------

On some pages I get:

A critical error has occurred.
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

When I try to access the "Portals" system page under "Host", sometimes I get it, but other times (seemingly random) I get the same error; when I try to add a new portal, however I got the same error except on the custom DNN error page (as opposed to somewhere on a module, etc like the above error).  Whatever is going on, it appears that sometimes it happens after the page request is filled in part (thus you get the error on the actual page) and sometimes it does not return the page at all, just the error, but it is NOT related to specific module or page.

When I try to access Host Settings I get (not sure if it is related, let me know if you also get this error):

Error: Host Settings is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=nnnnnnnnnnn' failed. ---> System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=nnnnnnnnnnn' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.IO.Path.GetFullPath(String path) at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath(String physicalPath, Boolean& pathTooLong) at System.Web.Util.FileUtil.IsSuspiciousPhysicalPath(String physicalPath) at System.Web.CachedPathData.GetConfigPathData(String configPath) at System.Web.CachedPathData.GetConfigPathData(String configPath) at System.Web.Configuration.WebConfigurationManager.GetWebApplicationSection(String sectionName) at DotNetNuke.Common.Utilities.Config.GetSection(String section) in C:\Inetpub\wwwroot\Library\Components\Shared\Config.vb:line 248 at DotNetNuke.Framework.Providers.ProviderConfiguration.GetProviderConfiguration(String strProvider) in C:\Inetpub\wwwroot\Library\Components\Providers\ProviderConfiguration.vb:line 37 at DotNetNuke.Modules.Admin.Host.HostSettingsModule.BindData() in C:\Inetpub\wwwroot\Website\admin\Host\HostSettings.ascx.vb:line 377 at DotNetNuke.Modules.Admin.Host.HostSettingsModule.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\Website\admin\Host\HostSettings.ascx.vb:line 446 The action that failed was: Demand The type of the first permission that failed was: System.Security.Permissions.FileIOPermission The Zone of the assembly that failed was: MyComputer --- End of inner exception stack trace ---

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Dotnetnuke 3.1 - Request for the permission of type System....FileIOPermission failed problemDotnetnuke 3.1 - Request for the permission of type System....FileIOPermission failed problem


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