Enterprise Library Configuration & network drives

Topics: General discussion
Nov 2, 2007 at 3:31 PM
I have noticed that I cannot save files to network drives when working in the Enterprise Library Configuration designer. The same .Config files can be manually edited and saved to the same network drives without trouble in Visual Studio, and I can save to local drives using the designer. When saving to a network drive using the designer, I get a series of errors:

1) "One or more errors occurred while trying to save the configuration."
2) "The operation could not be completed. Unspecified error"
3) Nodes in the designer tree get marked with "Attempt to perform an unauthorized operation".

Is this a known issue?
Jan 10, 2008 at 11:26 AM
I have exactly the same problem. Any hint on this?
Mar 14, 2008 at 12:58 PM
I must reask. App.config is not saveable if its located on a network-drive. It results in the listed errors above.
Is there any help?
Mar 14, 2008 at 2:38 PM
No idea if it's related, but I've also noticed that the TFS client for Visual Studio doesn't play well with network drives either. I cannot specify my mapped (i.e. it has a drive letter) network share as a local file system target for my TFS workspaces.
Mar 21, 2008 at 3:53 PM
Hi,

I don't see a reason why it wouldn't work. However, the tool uses the standard .NET System.Configuration API for writing the configuratin file.
Can you please try this stand alone app that writes a configuration section to a new configuration file? It uses the raw configuration API for this, so it would be helpful to determine where the problem lies.

code begins here - replace links with square brackets
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
ExeConfigurationFileMap map = new ExeConfigurationFileMap();
map.ExeConfigFilename = args0;
Configuration configuration = ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None);

TestConfigurationSection section = new TestConfigurationSection();
section.Property = "property value";
configuration.Sections.Add("test", section);

configuration.Save();
}
}

public class TestConfigurationSection : ConfigurationSection
{
ConfigurationProperty("property")
public string Property
{
get { return (string)base"property"; }
set { base"property" = value; }
}
}
}
Mar 21, 2008 at 6:53 PM

fsimonazzi wrote:
Hi,

I don't see a reason why it wouldn't work. However, the tool uses the standard .NET System.Configuration API for writing the configuratin file.
Can you please try this stand alone app that writes a configuration section to a new configuration file? It uses the raw configuration API for this, so it would be helpful to determine where the problem lies.


I tried your sample application, and was able to use it to make a test configuration file located on my mapped network share. Using the EL configuration designer, I still received the error when trying to save to the same location. I did notice, however, that it actually did create a .config file where I specified. The config file contained only the text "<configuration />", and no markup for the actual saved EL configuration.
Jul 9, 2008 at 8:26 PM
Edited Jul 9, 2008 at 8:37 PM
I too am having the same problem!
It seems like this could be a .net permissions issue - I opened start->admin tools-> .Net framework 2.0 Configuration, but can't figure out where I would set permissions (they appear to be full control)
Jul 14, 2008 at 7:56 PM
Hi,

I tried to repro this but didn't succeed. Can you try again with a debugger attached (the symbols are available for download from this site) in an attempt to get a hold of the actual exception? This information is unfortunately not available from the tool's UI.

Fernando


calamosjack wrote:
I too am having the same problem!
It seems like this could be a .net permissions issue - I opened start->admin tools-> .Net framework 2.0 Configuration, but can't figure out where I would set permissions (they appear to be full control)


Jul 7, 2009 at 2:22 AM

Fernando,

can you give me more details on how to run the EntLibConfig.exe with debug symbols?  I have 4.1 sources installed but not sure how to launch the DGB attached.  I also have an issue but using a console app that you provided i dont have a problem creating a file on a mapped drive.