I am experiencing exactly the same problem.
I completed a fresh installation of DNN 4.0.2 on GoDaddy. DNN was installed into a virtual directory. (example: domain.com/portal). There were no errors during the installation and the site was working without any problems. However, after I started the process of adding some content, I would randomly receive a Security Exception (see bottom of post). When I say random, I mean there is no recognizable pattern to the cause or timing of the exceptions. For example, clicking the Edit Text link of an Html/Text module and then clicking the Cancel link in the editor would work for x number of times. It might work 2 times or it might work for 10 minutes. It appears to be completely random.
I have tested the same scenario on an ASPNix account as well with the same results.
I have verified over and over again that permissions are set correctly, web.config is correct, and the virtual directory is configured to run as an application. The extremely frustrating part about all of this is that the site works part of the time. You can actually go through the process of adding/editing content (sometimes as long as 10 minutes). Then, at a random moment, I start getting Security Exceptions that continue until the web application is restarted. Once the web application is restarted, the exceptions discontinue again for a random amount of time. Again, this is not tied to a specific module. I cannot determine a distinguishable pattern other than restarting the web application will temporarily resolve the problem.
I have unsuccessfully attempted to duplicate this problem on my local machine. I requested that ASPNix send me the machine.config for my server for testing purposes. However, after explaining to them the error, they responded by telling me "You must run it in a full sub domain or full domain meaning it must be seperate site in IIS for sure results!". This is, of course, not true. I have two co-workers that are running successful installations of DNN 4.0.2 on GoDaddy without this problem. I have even compared my configuration and permissions to their sites and we are still unable to find a discrepancy.
If there is anyone who can shed some light as to some possible solutions or how to further diagnose the problem, it would be greatly appreciated. I have been pulling my hair out over this for the last two days.
Here is the exception information:
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.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, 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() +59
System.IO.Path.GetFullPath(String path) +98
System.Web.Util.FileUtil.IsSuspiciousPhysicalPath(String physicalPath, Boolean& pathTooLong) +50
System.Web.Util.FileUtil.IsSuspiciousPhysicalPath(String physicalPath) +23
System.Web.CachedPathData.GetConfigPathData(String configPath) +465
System.Web.CachedPathData.GetConfigPathData(String configPath) +243
System.Web.CachedPathData.GetConfigPathData(String configPath) +243
System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath, Boolean permitPathsOutsideApp) +132
System.Web.HttpContext.GetFilePathData() +27
System.Web.HttpContext.GetConfigurationPathData() +26
System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey) +36
System.Configuration.ConfigurationManager.GetSection(String sectionName) +107
System.Configuration.ConfigurationManager.get_AppSettings() +29
DotNetNuke.Common.Utilities.DataCache.get_CachePersistenceEnabled() +4
DotNetNuke.Services.Cache.FileBasedCachingProvider.FBCachingProvider.Insert(String CacheKey, Object objObject, Boolean PersistAppRestart) +60
DotNetNuke.Entities.Host.HostSettings.GetHostSettings() +250
DotNetNuke.Common.Globals.get_PerformanceSetting() +6
DotNetNuke.Security.Permissions.TabPermissionController.GetTabPermissionsByPortal(Int32 PortalID) +31
DotNetNuke.Entities.Tabs.TabController.FillTabInfo(IDataReader dr, Boolean CheckForOpenDataReader) +2571
DotNetNuke.Entities.Tabs.TabController.GetTab(Int32 TabId) +54
DotNetNuke.Entities.Portals.PortalSettings.GetPortalByTab(Int32 TabID, String PortalAlias) +32
DotNetNuke.HttpModules.UrlRewriteModule.OnBeginRequest(Object s, EventArgs e) +2309
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
|
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42