Configuration.GetSection always returns null









up vote
11
down vote

favorite












Every time I call Configuration.GetSection, the Value property of the returned object is always null.



My Startup constructor



public Startup(IHostingEnvironment env)

var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddEnvironmentVariables();

this.Configuration = builder.Build();



My ConfigureServices method



public void ConfigureServices(IServiceCollection services)

services.Configure<SqliteSettings>(opts => Configuration.GetSection("SqliteSettings").Bind(opts));

services.AddOptions();

services.AddMvc();



My appsettings.json




"SqliteSettings":
"DataSource": "C:\db.sqlite",
"NewDatabase": true,
"Version": 3




The class I'm using to define SqliteSettings



public class SqliteSettings

public string DataSource get; set;

public bool? NewDatabase get; set;

public int? Version get; set;

public string Password get; set;

public long? CacheSize get; set;

// More properties



I was thinking the JSON might need to have the same amount of properties to match, or is it might be something to do with data type definitions, but maybe those are completely unrelated.










share|improve this question

























    up vote
    11
    down vote

    favorite












    Every time I call Configuration.GetSection, the Value property of the returned object is always null.



    My Startup constructor



    public Startup(IHostingEnvironment env)

    var builder = new ConfigurationBuilder()
    .SetBasePath(env.ContentRootPath)
    .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
    .AddEnvironmentVariables();

    this.Configuration = builder.Build();



    My ConfigureServices method



    public void ConfigureServices(IServiceCollection services)

    services.Configure<SqliteSettings>(opts => Configuration.GetSection("SqliteSettings").Bind(opts));

    services.AddOptions();

    services.AddMvc();



    My appsettings.json




    "SqliteSettings":
    "DataSource": "C:\db.sqlite",
    "NewDatabase": true,
    "Version": 3




    The class I'm using to define SqliteSettings



    public class SqliteSettings

    public string DataSource get; set;

    public bool? NewDatabase get; set;

    public int? Version get; set;

    public string Password get; set;

    public long? CacheSize get; set;

    // More properties



    I was thinking the JSON might need to have the same amount of properties to match, or is it might be something to do with data type definitions, but maybe those are completely unrelated.










    share|improve this question























      up vote
      11
      down vote

      favorite









      up vote
      11
      down vote

      favorite











      Every time I call Configuration.GetSection, the Value property of the returned object is always null.



      My Startup constructor



      public Startup(IHostingEnvironment env)

      var builder = new ConfigurationBuilder()
      .SetBasePath(env.ContentRootPath)
      .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
      .AddEnvironmentVariables();

      this.Configuration = builder.Build();



      My ConfigureServices method



      public void ConfigureServices(IServiceCollection services)

      services.Configure<SqliteSettings>(opts => Configuration.GetSection("SqliteSettings").Bind(opts));

      services.AddOptions();

      services.AddMvc();



      My appsettings.json




      "SqliteSettings":
      "DataSource": "C:\db.sqlite",
      "NewDatabase": true,
      "Version": 3




      The class I'm using to define SqliteSettings



      public class SqliteSettings

      public string DataSource get; set;

      public bool? NewDatabase get; set;

      public int? Version get; set;

      public string Password get; set;

      public long? CacheSize get; set;

      // More properties



      I was thinking the JSON might need to have the same amount of properties to match, or is it might be something to do with data type definitions, but maybe those are completely unrelated.










      share|improve this question













      Every time I call Configuration.GetSection, the Value property of the returned object is always null.



      My Startup constructor



      public Startup(IHostingEnvironment env)

      var builder = new ConfigurationBuilder()
      .SetBasePath(env.ContentRootPath)
      .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
      .AddEnvironmentVariables();

      this.Configuration = builder.Build();



      My ConfigureServices method



      public void ConfigureServices(IServiceCollection services)

      services.Configure<SqliteSettings>(opts => Configuration.GetSection("SqliteSettings").Bind(opts));

      services.AddOptions();

      services.AddMvc();



      My appsettings.json




      "SqliteSettings":
      "DataSource": "C:\db.sqlite",
      "NewDatabase": true,
      "Version": 3




      The class I'm using to define SqliteSettings



      public class SqliteSettings

      public string DataSource get; set;

      public bool? NewDatabase get; set;

      public int? Version get; set;

      public string Password get; set;

      public long? CacheSize get; set;

      // More properties



      I was thinking the JSON might need to have the same amount of properties to match, or is it might be something to do with data type definitions, but maybe those are completely unrelated.







      asp.net-core .net-core






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 2 '17 at 19:48









      Liam Mueller

      168213




      168213






















          6 Answers
          6






          active

          oldest

          votes

















          up vote
          6
          down vote



          accepted










          Just modify your ConfigureServices method to be like following



          public void ConfigureServices(IServiceCollection services)

          services.AddOptions();

          services.Configure<SqliteSettings>(Configuration.GetSection("SqliteSettings"));

          services.AddMvc();



          And it should work.






          share|improve this answer
















          • 2




            Unforunately, did not work, although the order placement probably solves bugs that would occur in the future. Configuration.GetSection still returns with .Value being null.
            – Liam Mueller
            Sep 2 '17 at 20:06










          • Could you share how you are calling .Value?
            – Ali
            Sep 2 '17 at 20:07






          • 1




            To see if I was getting the JSON, was simply doing var x = Configuration.GetSection("SqliteSettings"); then inspecting x in Visual Studio, specifically for Value.
            – Liam Mueller
            Sep 2 '17 at 20:10






          • 3




            If you want to read directly from Configuration, use something like Configuration["SqliteSettings:DataSource"];. And if you want to use it in controllers use options pattern
            – Ali
            Sep 2 '17 at 20:18






          • 1




            I understood that in Startup.cs you can only get configuration json's "leaves" unlike in .net core 1 or so, and use such code: services_.Configure<CorporateConfiguration>( options_ => options_.Name = Configuration.GetValue<string>("Corporate:Name"); options_.BrandLogo = Configuration.GetValue<string>("Corporate:BrandLogo"); );
            – barbara.post
            Nov 6 '17 at 21:16


















          up vote
          0
          down vote













          This worked for me in console application



          var conncetionString = config["ConnectionStrings:DefaultConnection"]





          share|improve this answer



























            up vote
            0
            down vote













            var serviceProvider = services.BuildServiceProvider();



            Must come after all services.Configure calls.






            share|improve this answer



























              up vote
              0
              down vote













              In my case for Web Api Core 2.1 I needed it in the project root folder. Same folder as Startup.cs, Program.cs.






              share|improve this answer



























                up vote
                0
                down vote













                If you have an appsettings.Development.json file, make sure the "ConnectionStrings:DefaultConnection" settings are in both appsettings.Development.json and appsettings.json files.






                share|improve this answer



























                  up vote
                  -2
                  down vote













                  I had this problem before but my problem was that i put my json config file in wrong place ...
                  i should have put it in wwwroot folder . because asp.net core looks for files in this folder






                  share|improve this answer
















                  • 3




                    No - you should never put it in wwwroot. It goes in your /bin folder. Content in wwwroot could be accidently served from the server, leaking your credentials/config/secrets if any exist in there.
                    – Johnathon Sullinger
                    Jul 12 at 19:21










                  Your Answer






                  StackExchange.ifUsing("editor", function ()
                  StackExchange.using("externalEditor", function ()
                  StackExchange.using("snippets", function ()
                  StackExchange.snippets.init();
                  );
                  );
                  , "code-snippets");

                  StackExchange.ready(function()
                  var channelOptions =
                  tags: "".split(" "),
                  id: "1"
                  ;
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function()
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled)
                  StackExchange.using("snippets", function()
                  createEditor();
                  );

                  else
                  createEditor();

                  );

                  function createEditor()
                  StackExchange.prepareEditor(
                  heartbeatType: 'answer',
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader:
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  ,
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  );



                  );













                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function ()
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46017593%2fconfiguration-getsection-always-returns-null%23new-answer', 'question_page');

                  );

                  Post as a guest















                  Required, but never shown

























                  6 Answers
                  6






                  active

                  oldest

                  votes








                  6 Answers
                  6






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes








                  up vote
                  6
                  down vote



                  accepted










                  Just modify your ConfigureServices method to be like following



                  public void ConfigureServices(IServiceCollection services)

                  services.AddOptions();

                  services.Configure<SqliteSettings>(Configuration.GetSection("SqliteSettings"));

                  services.AddMvc();



                  And it should work.






                  share|improve this answer
















                  • 2




                    Unforunately, did not work, although the order placement probably solves bugs that would occur in the future. Configuration.GetSection still returns with .Value being null.
                    – Liam Mueller
                    Sep 2 '17 at 20:06










                  • Could you share how you are calling .Value?
                    – Ali
                    Sep 2 '17 at 20:07






                  • 1




                    To see if I was getting the JSON, was simply doing var x = Configuration.GetSection("SqliteSettings"); then inspecting x in Visual Studio, specifically for Value.
                    – Liam Mueller
                    Sep 2 '17 at 20:10






                  • 3




                    If you want to read directly from Configuration, use something like Configuration["SqliteSettings:DataSource"];. And if you want to use it in controllers use options pattern
                    – Ali
                    Sep 2 '17 at 20:18






                  • 1




                    I understood that in Startup.cs you can only get configuration json's "leaves" unlike in .net core 1 or so, and use such code: services_.Configure<CorporateConfiguration>( options_ => options_.Name = Configuration.GetValue<string>("Corporate:Name"); options_.BrandLogo = Configuration.GetValue<string>("Corporate:BrandLogo"); );
                    – barbara.post
                    Nov 6 '17 at 21:16















                  up vote
                  6
                  down vote



                  accepted










                  Just modify your ConfigureServices method to be like following



                  public void ConfigureServices(IServiceCollection services)

                  services.AddOptions();

                  services.Configure<SqliteSettings>(Configuration.GetSection("SqliteSettings"));

                  services.AddMvc();



                  And it should work.






                  share|improve this answer
















                  • 2




                    Unforunately, did not work, although the order placement probably solves bugs that would occur in the future. Configuration.GetSection still returns with .Value being null.
                    – Liam Mueller
                    Sep 2 '17 at 20:06










                  • Could you share how you are calling .Value?
                    – Ali
                    Sep 2 '17 at 20:07






                  • 1




                    To see if I was getting the JSON, was simply doing var x = Configuration.GetSection("SqliteSettings"); then inspecting x in Visual Studio, specifically for Value.
                    – Liam Mueller
                    Sep 2 '17 at 20:10






                  • 3




                    If you want to read directly from Configuration, use something like Configuration["SqliteSettings:DataSource"];. And if you want to use it in controllers use options pattern
                    – Ali
                    Sep 2 '17 at 20:18






                  • 1




                    I understood that in Startup.cs you can only get configuration json's "leaves" unlike in .net core 1 or so, and use such code: services_.Configure<CorporateConfiguration>( options_ => options_.Name = Configuration.GetValue<string>("Corporate:Name"); options_.BrandLogo = Configuration.GetValue<string>("Corporate:BrandLogo"); );
                    – barbara.post
                    Nov 6 '17 at 21:16













                  up vote
                  6
                  down vote



                  accepted







                  up vote
                  6
                  down vote



                  accepted






                  Just modify your ConfigureServices method to be like following



                  public void ConfigureServices(IServiceCollection services)

                  services.AddOptions();

                  services.Configure<SqliteSettings>(Configuration.GetSection("SqliteSettings"));

                  services.AddMvc();



                  And it should work.






                  share|improve this answer












                  Just modify your ConfigureServices method to be like following



                  public void ConfigureServices(IServiceCollection services)

                  services.AddOptions();

                  services.Configure<SqliteSettings>(Configuration.GetSection("SqliteSettings"));

                  services.AddMvc();



                  And it should work.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 2 '17 at 20:02









                  Ali

                  663513




                  663513







                  • 2




                    Unforunately, did not work, although the order placement probably solves bugs that would occur in the future. Configuration.GetSection still returns with .Value being null.
                    – Liam Mueller
                    Sep 2 '17 at 20:06










                  • Could you share how you are calling .Value?
                    – Ali
                    Sep 2 '17 at 20:07






                  • 1




                    To see if I was getting the JSON, was simply doing var x = Configuration.GetSection("SqliteSettings"); then inspecting x in Visual Studio, specifically for Value.
                    – Liam Mueller
                    Sep 2 '17 at 20:10






                  • 3




                    If you want to read directly from Configuration, use something like Configuration["SqliteSettings:DataSource"];. And if you want to use it in controllers use options pattern
                    – Ali
                    Sep 2 '17 at 20:18






                  • 1




                    I understood that in Startup.cs you can only get configuration json's "leaves" unlike in .net core 1 or so, and use such code: services_.Configure<CorporateConfiguration>( options_ => options_.Name = Configuration.GetValue<string>("Corporate:Name"); options_.BrandLogo = Configuration.GetValue<string>("Corporate:BrandLogo"); );
                    – barbara.post
                    Nov 6 '17 at 21:16













                  • 2




                    Unforunately, did not work, although the order placement probably solves bugs that would occur in the future. Configuration.GetSection still returns with .Value being null.
                    – Liam Mueller
                    Sep 2 '17 at 20:06










                  • Could you share how you are calling .Value?
                    – Ali
                    Sep 2 '17 at 20:07






                  • 1




                    To see if I was getting the JSON, was simply doing var x = Configuration.GetSection("SqliteSettings"); then inspecting x in Visual Studio, specifically for Value.
                    – Liam Mueller
                    Sep 2 '17 at 20:10






                  • 3




                    If you want to read directly from Configuration, use something like Configuration["SqliteSettings:DataSource"];. And if you want to use it in controllers use options pattern
                    – Ali
                    Sep 2 '17 at 20:18






                  • 1




                    I understood that in Startup.cs you can only get configuration json's "leaves" unlike in .net core 1 or so, and use such code: services_.Configure<CorporateConfiguration>( options_ => options_.Name = Configuration.GetValue<string>("Corporate:Name"); options_.BrandLogo = Configuration.GetValue<string>("Corporate:BrandLogo"); );
                    – barbara.post
                    Nov 6 '17 at 21:16








                  2




                  2




                  Unforunately, did not work, although the order placement probably solves bugs that would occur in the future. Configuration.GetSection still returns with .Value being null.
                  – Liam Mueller
                  Sep 2 '17 at 20:06




                  Unforunately, did not work, although the order placement probably solves bugs that would occur in the future. Configuration.GetSection still returns with .Value being null.
                  – Liam Mueller
                  Sep 2 '17 at 20:06












                  Could you share how you are calling .Value?
                  – Ali
                  Sep 2 '17 at 20:07




                  Could you share how you are calling .Value?
                  – Ali
                  Sep 2 '17 at 20:07




                  1




                  1




                  To see if I was getting the JSON, was simply doing var x = Configuration.GetSection("SqliteSettings"); then inspecting x in Visual Studio, specifically for Value.
                  – Liam Mueller
                  Sep 2 '17 at 20:10




                  To see if I was getting the JSON, was simply doing var x = Configuration.GetSection("SqliteSettings"); then inspecting x in Visual Studio, specifically for Value.
                  – Liam Mueller
                  Sep 2 '17 at 20:10




                  3




                  3




                  If you want to read directly from Configuration, use something like Configuration["SqliteSettings:DataSource"];. And if you want to use it in controllers use options pattern
                  – Ali
                  Sep 2 '17 at 20:18




                  If you want to read directly from Configuration, use something like Configuration["SqliteSettings:DataSource"];. And if you want to use it in controllers use options pattern
                  – Ali
                  Sep 2 '17 at 20:18




                  1




                  1




                  I understood that in Startup.cs you can only get configuration json's "leaves" unlike in .net core 1 or so, and use such code: services_.Configure<CorporateConfiguration>( options_ => options_.Name = Configuration.GetValue<string>("Corporate:Name"); options_.BrandLogo = Configuration.GetValue<string>("Corporate:BrandLogo"); );
                  – barbara.post
                  Nov 6 '17 at 21:16





                  I understood that in Startup.cs you can only get configuration json's "leaves" unlike in .net core 1 or so, and use such code: services_.Configure<CorporateConfiguration>( options_ => options_.Name = Configuration.GetValue<string>("Corporate:Name"); options_.BrandLogo = Configuration.GetValue<string>("Corporate:BrandLogo"); );
                  – barbara.post
                  Nov 6 '17 at 21:16













                  up vote
                  0
                  down vote













                  This worked for me in console application



                  var conncetionString = config["ConnectionStrings:DefaultConnection"]





                  share|improve this answer
























                    up vote
                    0
                    down vote













                    This worked for me in console application



                    var conncetionString = config["ConnectionStrings:DefaultConnection"]





                    share|improve this answer






















                      up vote
                      0
                      down vote










                      up vote
                      0
                      down vote









                      This worked for me in console application



                      var conncetionString = config["ConnectionStrings:DefaultConnection"]





                      share|improve this answer












                      This worked for me in console application



                      var conncetionString = config["ConnectionStrings:DefaultConnection"]






                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jan 31 at 17:08









                      Sameh

                      392




                      392




















                          up vote
                          0
                          down vote













                          var serviceProvider = services.BuildServiceProvider();



                          Must come after all services.Configure calls.






                          share|improve this answer
























                            up vote
                            0
                            down vote













                            var serviceProvider = services.BuildServiceProvider();



                            Must come after all services.Configure calls.






                            share|improve this answer






















                              up vote
                              0
                              down vote










                              up vote
                              0
                              down vote









                              var serviceProvider = services.BuildServiceProvider();



                              Must come after all services.Configure calls.






                              share|improve this answer












                              var serviceProvider = services.BuildServiceProvider();



                              Must come after all services.Configure calls.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jul 19 at 8:26









                              Amorphis

                              309212




                              309212




















                                  up vote
                                  0
                                  down vote













                                  In my case for Web Api Core 2.1 I needed it in the project root folder. Same folder as Startup.cs, Program.cs.






                                  share|improve this answer
























                                    up vote
                                    0
                                    down vote













                                    In my case for Web Api Core 2.1 I needed it in the project root folder. Same folder as Startup.cs, Program.cs.






                                    share|improve this answer






















                                      up vote
                                      0
                                      down vote










                                      up vote
                                      0
                                      down vote









                                      In my case for Web Api Core 2.1 I needed it in the project root folder. Same folder as Startup.cs, Program.cs.






                                      share|improve this answer












                                      In my case for Web Api Core 2.1 I needed it in the project root folder. Same folder as Startup.cs, Program.cs.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Sep 4 at 20:23









                                      Eric Schneider

                                      3,98523149




                                      3,98523149




















                                          up vote
                                          0
                                          down vote













                                          If you have an appsettings.Development.json file, make sure the "ConnectionStrings:DefaultConnection" settings are in both appsettings.Development.json and appsettings.json files.






                                          share|improve this answer
























                                            up vote
                                            0
                                            down vote













                                            If you have an appsettings.Development.json file, make sure the "ConnectionStrings:DefaultConnection" settings are in both appsettings.Development.json and appsettings.json files.






                                            share|improve this answer






















                                              up vote
                                              0
                                              down vote










                                              up vote
                                              0
                                              down vote









                                              If you have an appsettings.Development.json file, make sure the "ConnectionStrings:DefaultConnection" settings are in both appsettings.Development.json and appsettings.json files.






                                              share|improve this answer












                                              If you have an appsettings.Development.json file, make sure the "ConnectionStrings:DefaultConnection" settings are in both appsettings.Development.json and appsettings.json files.







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Nov 10 at 15:13









                                              fortBarthadam

                                              513




                                              513




















                                                  up vote
                                                  -2
                                                  down vote













                                                  I had this problem before but my problem was that i put my json config file in wrong place ...
                                                  i should have put it in wwwroot folder . because asp.net core looks for files in this folder






                                                  share|improve this answer
















                                                  • 3




                                                    No - you should never put it in wwwroot. It goes in your /bin folder. Content in wwwroot could be accidently served from the server, leaking your credentials/config/secrets if any exist in there.
                                                    – Johnathon Sullinger
                                                    Jul 12 at 19:21














                                                  up vote
                                                  -2
                                                  down vote













                                                  I had this problem before but my problem was that i put my json config file in wrong place ...
                                                  i should have put it in wwwroot folder . because asp.net core looks for files in this folder






                                                  share|improve this answer
















                                                  • 3




                                                    No - you should never put it in wwwroot. It goes in your /bin folder. Content in wwwroot could be accidently served from the server, leaking your credentials/config/secrets if any exist in there.
                                                    – Johnathon Sullinger
                                                    Jul 12 at 19:21












                                                  up vote
                                                  -2
                                                  down vote










                                                  up vote
                                                  -2
                                                  down vote









                                                  I had this problem before but my problem was that i put my json config file in wrong place ...
                                                  i should have put it in wwwroot folder . because asp.net core looks for files in this folder






                                                  share|improve this answer












                                                  I had this problem before but my problem was that i put my json config file in wrong place ...
                                                  i should have put it in wwwroot folder . because asp.net core looks for files in this folder







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered May 28 at 12:16









                                                  Abolfazl

                                                  456410




                                                  456410







                                                  • 3




                                                    No - you should never put it in wwwroot. It goes in your /bin folder. Content in wwwroot could be accidently served from the server, leaking your credentials/config/secrets if any exist in there.
                                                    – Johnathon Sullinger
                                                    Jul 12 at 19:21












                                                  • 3




                                                    No - you should never put it in wwwroot. It goes in your /bin folder. Content in wwwroot could be accidently served from the server, leaking your credentials/config/secrets if any exist in there.
                                                    – Johnathon Sullinger
                                                    Jul 12 at 19:21







                                                  3




                                                  3




                                                  No - you should never put it in wwwroot. It goes in your /bin folder. Content in wwwroot could be accidently served from the server, leaking your credentials/config/secrets if any exist in there.
                                                  – Johnathon Sullinger
                                                  Jul 12 at 19:21




                                                  No - you should never put it in wwwroot. It goes in your /bin folder. Content in wwwroot could be accidently served from the server, leaking your credentials/config/secrets if any exist in there.
                                                  – Johnathon Sullinger
                                                  Jul 12 at 19:21

















                                                  draft saved

                                                  draft discarded
















































                                                  Thanks for contributing an answer to Stack Overflow!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid


                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.

                                                  To learn more, see our tips on writing great answers.





                                                  Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                                  Please pay close attention to the following guidance:


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid


                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.

                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function ()
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46017593%2fconfiguration-getsection-always-returns-null%23new-answer', 'question_page');

                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

                                                  Syphilis

                                                  Darth Vader #20