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 ---