IIS Error: Unable to read the value for the given section: AppSettings

Today I got the below IIS error (Unable to read the value for the given section) from the web application which I am developing.

On seeing the error message, it appeared as if the application was trying to read the AppSettings section from the web.config. But it was unable to read the web.config because the server refused the connection.

Solution

After analyzing the connection to the port, I found the port was blocked by the windows firewall. After setting a new inbound rule and opening up the port, the application started working. Details on opening port in windows firewall is available here.

Error Details

Server Error in '/<<--Web Application Name-->>' Application.
--------------------------------------------------------------------------------
Unable to read the value for the given section: AppSettings
Exception: No connection could be made because the target machine actively refused it <<--IP Address-->>:8020
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Unable to read the value for the given section: AppSettings
Exception: No connection could be made because the target machine actively refused it <<--IP Address-->>:8020

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[Exception: Unable to read the value for the given section: AppSettings
Exception: No connection could be made because the target machine actively refused it <<--IP Address-->>:8020]
 <<--Assembly Name-->>.Common.ApplicationConfig.GetSectionKeyValue(String sectionName, String keyName) +1191
 <<--Assembly Name-->>.Web.Common.CommonHelper.ConfigureThreadPool() +42
 <<--Assembly Name-->>.Web.MvcApplication.Application_Start() +29

[HttpException (0x80004005): Unable to read the value for the given section: AppSettings
Exception: No connection could be made because the target machine actively refused it <<--IP Address-->>:8020]
 System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +4179473
 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +205
 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +336
 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +350
 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +382

[HttpException (0x80004005): Unable to read the value for the given section: AppSettings
Exception: No connection could be made because the target machine actively refused it <<--IP Address-->>:8020]
 System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11318198
 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4348404
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.5444; ASP.NET Version:2.0.50727.5420


Leave your thoughts...

This site uses Akismet to reduce spam. Learn how your comment data is processed.