get reference to the ASP.NET web.config customErrors section
I'm trying to obtain a reference to the web.config customErrors section. When I use the following code I always get a null. I don't have this problem when I get a reference to a custom section that I've created so I'm a bit dumbfounded why this won't work. 

    CustomErrorsSection customErrorSection = ConfigurationManager.GetSection("customErrors") as CustomErrorsSection;

I've also tried this:

    CustomErrorsSection customErrorSection = WebConfigurationManager.GetSection("customErrors") as CustomErrorsSection;

I've also tried this:

    CustomErrorsSection customErrorSection = WebConfigurationManager.GetWebApplicationSection("customErrors") as CustomErrorSection;


get reference to the ASP.NET web.config customErrors section
===

I'm trying to obtain a reference to the web.config customErrors section. When I use the following code I always get a null. I don't have this problem when I get a reference to a custom section that I've created so I'm a bit dumbfounded why this won't work. 

    CustomErrorsSection customErrorSection = ConfigurationManager.GetSection("customErrors") as CustomErrorsSection;

I've also tried this:

    CustomErrorsSection customErrorSection = WebConfigurationManager.GetSection("customErrors") as CustomErrorsSection;

I've also tried this:

    CustomErrorsSection customErrorSection = WebConfigurationManager.GetWebApplicationSection("customErrors") as CustomErrorSection;

