ConfigurationSettings
-
I am trying to read a custom config section but its not working. ConfigurationSetting.GetConfig() returns null; CONFIG FILE:
CODE: IDictionary valueTable = (IDictionary)ConfigurationSettings.GetConfig("data"); string Server = (string)valueTable["Server"]; string Username = (string)valueTable["Username"]; string Password = (string)valueTable["Password"]; string Encrypt = (string)valueTable["Encrypt"]; string Security = (string)valueTable["Security"]; Any ideas? Thanks. Steve Not all who wander are lost...
-
I am trying to read a custom config section but its not working. ConfigurationSetting.GetConfig() returns null; CONFIG FILE:
CODE: IDictionary valueTable = (IDictionary)ConfigurationSettings.GetConfig("data"); string Server = (string)valueTable["Server"]; string Username = (string)valueTable["Username"]; string Password = (string)valueTable["Password"]; string Encrypt = (string)valueTable["Encrypt"]; string Security = (string)valueTable["Security"]; Any ideas? Thanks. Steve Not all who wander are lost...
You need to change the section line to specify the full assembly name (since the assembly has a strong name this means the typename, the assembly name, version, and public key token). <section name="data" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> I have an article that's done but needs formatting and proofreading before I post it. James "Java is free - and worth every penny." - Christian Graus
-
You need to change the section line to specify the full assembly name (since the assembly has a strong name this means the typename, the assembly name, version, and public key token). <section name="data" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> I have an article that's done but needs formatting and proofreading before I post it. James "Java is free - and worth every penny." - Christian Graus
I'm getting a 404 on your article. Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n
-
I'm getting a 404 on your article. Jared jparsons@jparsons.org www.prism.gatech.edu/~gte477n
Oops :-O it should have been configurationhandler not section :) Correct link[^] James "Java is free - and worth every penny." - Christian Graus