[Mono-bugs] [Bug 545525] New: Exception when a strong named assembly reads or writes setting when the Company name has non allowed characters

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Oct 8 16:10:56 EDT 2009


           Summary: Exception when a strong named assembly reads or writes
                    setting when the Company name has non allowed
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: i386
        OS/Version: Windows
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: richard at laparola.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; it; rv:
Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)

When an assembly is strong named, the settings (when calling
ProgramName.Properties.Settings.Default.ExampleSetting) are saved in or read
from a directory that includes the "Company" field in the Assembly Information.
If however the Company field includes characters that can not be used in a
directory name, such as \/:*?"<>| in Windows, then an exception is thrown and
the settings aren't used. The exception with the end of the calling stack is

Unhandled Exception: System.IO.IOException: Win 32 IO returned
ERROR_INVALID_NAME. Path: C:\Users\richard\AppData\Roaming\ProgramName
at System.IO.Directory.Exists (System.String path) [0x00036] in
at System.Configuration.CustomizableFileSettingsProvider.PrevVersionPath
(System.String dirName, System.String currentVersion) [0x00006] in
at System.Configuration.CustomizableFileSettingsProvider.CreateUserConfigPath()
[0.00268] in

Microsoft Studio replaces the non allowed characters and all spaces with an
underscore. It also truncates the Company name if it is long, and stores the
settings in AppData\Local rather than AppData\Roaming, but I don't believe that
that is important.

Reproducible: Always

Steps to Reproduce:
1. Create a new assembly and strong name it.
2. In the Assembly Information of the properties, but some non allowed
characters (eg /) in the Company field
3. Create a new setting in the assembly, eg ExampleSetting
4. In the program, read Settings.Default.ExampleSetting
Actual Results:  
An IOException

Expected Results:  
The settings would be read or written.

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list