Custom app.config Config Section Handler

First you add a property in the class that extends Section: [ConfigurationProperty(“pages”, IsDefaultCollection = false)] [ConfigurationCollection(typeof(PageCollection), AddItemName = “add”)] public PageCollection Pages { get { return (PageCollection) this[“pages”]; } } Then you need to make a PageCollection class. All the examples I’ve seen are pretty much identical so just copy this one and rename “NamedService” … Read more

Windows Service Config File C#

I located the error and it was related to file permissions. After installing the service, my local user account didn’t have access to modify the app.exe.config file. The tool I was using to edit was not informing me it was being denied access to save the file – that’s notepad++ if anyone is interested – … Read more

What is the Neutral Language setting used for?

I believe it sets the NeutralResourcesLanguageAttribute for the assembly. From the docs: The NeutralResourcesLanguageAttribute informs the ResourceManager of the language used to write the neutral culture’s resources for an assembly, and can also inform the ResourceManager of the assembly to use (either the main assembly or a satellite assembly) to retrieve neutral resources using the … Read more

Error : No unix socket support on windows connecting mongodb

I had the same issue and was able to fix it by removing the full url (for example: mongodb://myuser:[email protected]/my_database) in the connection tab and only putting in the mongodb server url: mongodb-test.mydomain.com. Next, in the Authentication tab, I checked the Perform authentication checkbox, specified the Database, user name, password. I also added the database in … Read more

What is the best way of reading configuration parameters from configuration file in Java?

I am thinking it will impact performance. I doubt that this will be true. Assuming that the application reads the configuration file just once at startup, the time taken to read the file is probably irrelevant to your application’s overall performance. Indeed, the longer the application runs, the less important startup time will be. Standard … Read more