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

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Security error upgrading from 4.9.5 to 5.6.2Security error upgrading from 4.9.5 to 5.6.2
Previous
 
Next
New Post
6/4/2011 12:16 AM
 
I ran the upgrade process from 4.9.5 to 5.6.2 twice today, once on my test system and once on my production system, with different results.

The test system is a Windows 7 Ultimate laptop, fully patched, running IIS 7, ASP.NET 3.5 and SQL Server 2005 Express.  This install completed without error.

The production system is hosted at Server Intellect.  I don't know the Windows Server version (I suspect it's 2005), but IIS is v.6, ASP.NET is 3.5 SP1, and SQL server is 2005.This install completed successfully with one error:

00:01:40.859 -   Executing Application Upgrades: 05.03.00 Error!

Everything else completed successfully, but when I clicked on the "Access your portal" link I got this error:

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:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

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() +58
   System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity) +595
   System.IO.DirectoryInfo.Create() +15
   DotNetNuke.Services.Installer.Util.WriteStream(Stream SourceStream, String DestFileName) +71
   DotNetNuke.Services.Installer.InstallerInfo.ReadZipStream(Stream inputStream, Boolean isEmbeddedZip) +206
   DotNetNuke.Services.Installer.InstallerInfo..ctor(Stream inputStream, String sitePath) +209
   DotNetNuke.Services.Installer.Installer..ctor(Stream inputStream, String physicalSitePath, Boolean loadManifest, Boolean deleteTemp) +61
   DotNetNuke.Services.Upgrade.Upgrade.InstallPackage(String strFile, String packageType, Boolean writeFeedback) +215
   DotNetNuke.Services.Upgrade.Upgrade.InstallPackages(String packageType, Boolean writeFeedback) +216
   DotNetNuke.Services.Install.Install.UpgradeApplication() +967
   DotNetNuke.Services.Install.Install.Page_Load(Object sender, EventArgs e) +325
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.install_install_aspx.ProcessRequest(HttpContext context) +4
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

=== end of error message ===

A Google search suggests that this error may be an IIS error and may be related to the fact that the trust level on both systems is set to:

<trust level="Medium" originUrl=".*" />

Apparently this trust level is OK on a local server but not on a remote server.  Can anyone clarify this for me?  I'm strongly tempted to change the trust level setting to "Full" on my production server and see if I can bring the site up but I don't know enough about IIS to know what effect this would have.  Advice greatly appreciated.

hedera
**********
Nature bats last.
 
New Post
6/4/2011 3:45 AM
 
make sure to unblock files after unzipping/uploading to the server. Make sure that the account used by ASP.Net ("Network Service" on IIS 6) has been granted full file system permission to the DNN installation directories and all files and folders inside.
Besides, I suggest upgrading in multiple steps via 5.2.3, 5.4.4 and 5.5.1

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
6/4/2011 1:01 PM
 
I absolutely did unblock the ZIP file after downloading it, before unzipping the files into my holding folder.  It's on my install checklist.  I don't upload the zip file to the server; I unzip it to a holding folder on my laptop and then use FileZilla to upload the files from the holding folder to my site, overwriting everything.  This has worked for at least four previous upgrades.

The account used by ASP.NET on my hosted site has the same permissions it has had all along.  The site has been running on version 4.x for over 4 years.  The management tool my hosting company provides doesn't give me access to folder permissions.  I plan to move the site to another hosting company in the fall when our prepaid annual contract is up.

I saw your suggestion in another thread to upgrade in steps.  Actually, you're now suggesting even more steps, the earlier thread only suggested upgrading via 5.2.3 and 5.4.4.  But I had successfully upgraded directly from 4.9.5 to 5.6.1 on my laptop, last February, and I thought I would try the direct upgrade to 5.6.2 to see if it would work.  On my laptop, it did work, and produced a fully functional site; so I tried the upgrade in production and hit this error.  If I can't get a decent answer from anybody on this, I'll go back and do the double or triple upgrade; but you know, I'm a volunteer, I don't get paid for doing this, so I'd like to do it as efficiently as I can.

hedera
**********
Nature bats last.
 
New Post
6/6/2011 3:07 PM
 
Following Sebastian Leupold's advice, I had my hosting company restore the site to its condition early Friday, before my upgrade; and today I tried to upgrade to DNN 5.2.3.  I got almost the identical error from DNN except that it happened during the install - actually right at the end of the install.  Here is the error message plus stack trace:

Server Error in '/' Application.
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:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:


  
      
  



Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

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() +58
   System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity) +595
   System.IO.DirectoryInfo.Create() +15
   DotNetNuke.Services.Installer.Util.WriteStream(Stream SourceStream, String DestFileName) +71
   DotNetNuke.Services.Installer.InstallerInfo.ReadZipStream(Stream inputStream, Boolean isEmbeddedZip) +206
   DotNetNuke.Services.Installer.InstallerInfo..ctor(Stream inputStream, String sitePath) +208
   DotNetNuke.Services.Installer.Installer..ctor(Stream inputStream, String physicalSitePath, Boolean loadManifest, Boolean deleteTemp) +61
   DotNetNuke.Services.Upgrade.Upgrade.InstallPackage(String strFile, String packageType, Boolean writeFeedback) +215
   DotNetNuke.Services.Upgrade.Upgrade.InstallPackages(String packageType, Boolean writeFeedback) +215
   DotNetNuke.Services.Install.Install.UpgradeApplication() +948
   DotNetNuke.Services.Install.Install.Page_Load(Object sender, EventArgs e) +272
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.install_install_aspx.ProcessRequest(HttpContext context) +4
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

==== END OF ERROR MESSAGE ===

I've talked to the tech support people.  Before I began the upgrade we established that the NT AUTHORITY\NETWORK SERVICE User has full permission for the site root directory and all subdirectories.  Since there was some indication in a Google search that this was a trust level issue, they set the site trust level to "Full."  It didn't help.  The default trust level for the 5.2.3 install seems to be "Medium." 

Please, I need help; I'm not an expert in the support structures.  DNN 5.2.3 should be able to run on IIS 6.  Is there some known IIS 6 configuration problem that could have caused this?  Is it even IIS?

hedera
**********
Nature bats last.
 
New Post
6/6/2011 6:05 PM
 
An additional question has come up.  I recently got the following message from my hosting tech support:

I have reviewed the error and it would look like your site will need full trust permissions applied. Due to the nature of applying full trust, this will need to be done overnight - I will set this ticket to follow up overnight to have full trust applied. We will update you as soon as this is completed.


However, once this is done I will still have a site on which the initial install failed with the error message I gave.  If they just change the trust, will the site then run?  Would I have to run the install scripts again?  Could I even run the install scripts again, or do we have to restore the site from pre-upgrade backup and start over?  Advice greatly appreciated.

Also, why will my site need full trust permissions when the default trust level set in web.config is medium?

hedera
**********
Nature bats last.
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...Security error upgrading from 4.9.5 to 5.6.2Security error upgrading from 4.9.5 to 5.6.2


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