Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VB.NET Writing a custom type for My.Settings

Posted on 2009-04-27
5
Medium Priority
?
1,259 Views
Last Modified: 2013-11-08
I have implemented a class that inherits the CollectionBase class.  I want to store this class/type using the My.Settings feature of VB.NET.  I am able to add the setting and select my registered type, however when I startup my project, I get an error: Configuration system filed to initialize.

Below is my custom type code.
Namespace SiteLists
 
    <Serializable()> _
    Public Class SiteListCollection
        Inherits CollectionBase
 
        Default Public ReadOnly Property Item(ByVal index As Integer) As SiteList
            Get
                Return DirectCast(List(index), SiteList)
            End Get
        End Property
 
        Public Sub Add(ByVal siteList As SiteList)
            List.Add(siteList)
        End Sub
 
        Public Sub Remove(ByVal siteList As SiteList)
            List.Remove(siteList)
        End Sub
    End Class
 
    <Serializable()> _
    Public Class SiteList
        Private _Name As String
        Private _Url As String
 
        Public Property Name() As String
            Get
                Return _Name
            End Get
            Set(ByVal value As String)
                _Name = value
            End Set
        End Property
 
        Public Property Url() As String
            Get
                Return _Url
            End Get
            Set(ByVal value As String)
                _Url = value
            End Set
        End Property
 
        Public Sub New(ByVal ListName As String, ByVal ListUrl As String)
            _Name = ListName
            _Url = ListUrl
        End Sub
    End Class
 
End Namespace

Open in new window

0
Comment
Question by:sr2007
4 Comments
 

Author Comment

by:sr2007
ID: 24242877
Yes, I have seen these articles.  No help.  Sorry.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24285968
This is not exactly what you have asked for but may be useful

http://www.codeproject.com/KB/vb/myextensions.aspx
0
 
LVL 3

Accepted Solution

by:
Kevin Robinson earned 1500 total points
ID: 24359142
The "Configuration system filed to initialize" error has nothing to do with your code.  It is related to the LOCAL PC. I have developed a system that works on very many remote computers but a few give this error.  It is more to do with some windows security.  There are some documented resolutions to this but NONE worked for me.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month20 days, 22 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question