none
App.Config how to get GetSection of ApplicationSetting? RRS feed

  • Question

  • Hi,

    I have following setting in my app config file.

     

     <applicationSettings>
    
        <My.MySettings>
    
          <setting name="LicenseKey" serializeAs="String">
    
            <value>December31, 2011</value>
    
          </setting>
    
        </My.MySettings>
    
      </applicationSettings>

     In another app, I have a code that suppose to read this section.

     

                Dim config As Configuration = ConfigurationManager.OpenExeConfiguration(strPath)
    
    
                Dim section As ConfigurationSection = config.GetSection(strSectionName)
    
    


    What should my strSectionName value be? applicationSettings/AppName.My.MySettings.LicenseKey returns nothing.

    I am able to retrieve appSettings and connectionStrings section without problem.

    Cheers,

    Randeep

     


    R.S.S.
    Wednesday, February 1, 2012 4:00 PM

Answers

  • The answer I was looking for is : applicationSettings/My.MySettings
    R.S.S.
    • Marked as answer by R. Singh Friday, February 3, 2012 3:32 AM
    Friday, February 3, 2012 3:32 AM

All replies