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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0New AddCodeSubDirectory method fails in hosted environmentNew AddCodeSubDirectory method fails in hosted environment
Previous
 
Next
New Post
8/7/2006 11:24 AM
 
I have had a number of users reporting getting this when trying to upgrade NukeSyndicate.

Failure     ExceptionSystem.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Access to the path 'C:\WINDOWS\Microsoft.NET\Framework\V2.0.50727\Config\sf7ydtee.tmp' is denied. (C:\WINDOWS\Microsoft.NET\Framework\V2.0.50727\Config\web.config) ---> System.UnauthorizedAccessException: Access to the path 'C:\WINDOWS\Microsoft.NET\Framework\V2.0.50727\Config\sf7ydtee.tmp' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) at System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated() at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile) at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension) at System.Configuration.Internal.WriteFileContext..ctor(String filename, String templateFilename) at System.Configuration.Internal.InternalConfigHost.StaticOpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext, Boolean assertPermissions) at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext, Boolean assertPermissions) at System.Configuration.Internal.InternalConfigHost.System.Configuration.Internal.IInternalConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext) at System.Configuration.Internal.DelegatingConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext) at System.Configuration.UpdateConfigHost.OpenStreamForWrite(String streamName, String templateStreamName, Object& writeContext) at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll) --- End of inner exception stack trace --- at System.Configuration.MgmtConfigurationRecord.SaveAs(String filename, ConfigurationSaveMode saveMode, Boolean forceUpdateAll) at System.Configuration.Configuration.SaveAsImpl(String filename, ConfigurationSaveMode saveMode, Boolean forceSaveAll) at System.Configuration.Configuration.Save() at DotNetNuke.Common.Utilities.Config.AddCodeSubDirectory(String name) at DotNetNuke.Modules.Admin.ResourceInstaller.PaDnnInstallerBase.CreateModuleFile(PaFile File, PaFolder Folder) at DotNetNuke.Modules.Admin.ResourceInstaller.PaDnnInstallerBase.CreateFiles(PaFolder Folder) at DotNetNuke.Modules.Admin.ResourceInstaller.PaDnnInstallerBase.Install(PaFolderCollection folders) at DotNetNuke.Modules.Admin.ResourceInstaller.PaInstaller.Install()

It only seems to effect remotely hosted sites, if you install locally it is fine. I am unsure whether this in an actual ACL issue on the host, or whether something has changed. Additionally I should add this module is written in C# and uses the App_Code folder for the new dynamic compilation method. I have not had this reported prior to 4.3.3. Can anyone else reproduce this with their modules since then? Can any core team member comment on what might have changed
 
New Post
8/8/2006 8:34 AM
 
More reports of this, something has definately changed...
 
New Post
8/8/2006 8:52 AM
 
Here is the offending method. This code fails in a hosted environment when installing NukeSyndicate at least. Got tired of looking for the file, so I just used Refelctor as you can see


public static void AddCodeSubDirectory(string name)
{
   System.Configuration.Configuration configuration1 = WebConfigurationManager.OpenWebConfiguration(Globals.ApplicationPath);
   CompilationSection section1 = (CompilationSection) configuration1.GetSection("system.web/compilation");
   bool flag1 = false;

   try
   {

      foreach (CodeSubDirectory directory1 in section1.CodeSubDirectories)
      {
          if (Operators.CompareString(directory1.DirectoryName, name, false) == 0)
          {
             flag1 = true; goto Label_008B;
          }
      }
   }

   finally
   {
      IEnumerator enumerator1;

      if (enumerator1 is IDisposable)
      {
         (enumerator1 as IDisposable).Dispose();
      }
   }

   Label_008B: if (!flag1)
   {
      section1.CodeSubDirectories.Add(new CodeSubDirectory(name)); configuration1.Save();
   }
}
 
New Post
8/8/2006 8:59 AM
 
Line 47 in Config.vb


Public Shared Sub AddCodeSubDirectory(ByVal name As String)

  Dim webConfig As System.Configuration.Configuration = WebConfigurationManager.OpenWebConfiguration(Globals.ApplicationPath)
  Dim configSection As CompilationSection = CType(webConfig.GetSection("system.web/compilation"), CompilationSection)
  Dim directoryFound As Boolean = False

  For Each codeSubDirectory As CodeSubDirectory In configSection.CodeSubDirectories
    If codeSubDirectory.DirectoryName = name Then
      directoryFound = True
      Exit For
    End If
  Next

  If Not directoryFound Then
    configSection.CodeSubDirectories.Add(New CodeSubDirectory(name))
    webConfig.Save()
  End If
End Sub
 
New Post
8/8/2006 10:15 AM
 
Logged in Gemini here
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0New AddCodeSubDirectory method fails in hosted environmentNew AddCodeSubDirectory method fails in hosted environment


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