Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8052591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:34:50+00:00 2026-06-05T07:34:50+00:00

I installed a Windows serivce that fetches has to fetch some strings from the

  • 0

I installed a Windows serivce that fetches has to fetch some strings from the App.Config file by the following method in OnStart – ConfigurationManager.AppSettings["stringName"];
Inside the App.Config, I also have a source defined for the log file which I use to write to my log file.

However, as I successfully install my service and try to start it from Serivce Control Explorer inside My Computer -> Manage - > Device Manager, I get a message saying

The service on the local computer and then stopped. Some services stop automatically if not used by toher applications

Inside the Windows Event Viewer, I get the following error detail (perhaps there is an exception thrown while starting the service)

Here’s the error detail for the same:

Service cannot be started. System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration section add. (C:\Program Files (x86)\Default Company Name\ServiceSetup\ServiceChecker.exe.Config line 3)
   at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
   at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
   at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
   --- End of inner exception stack trace ---
   at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
   at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
   at System.Configuration.ConfigurationManager.GetSection(String sectionName)
   at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
   at System.Dia...

The above detail shows error detail related to .exe.config file of the service. I have tried uninstalling and reinstalling the service and the installation Account for the serivce is set as Local system which has broad system previliges.

my App.Config in the project:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
<appSettings>
      <add key="UtilName" value="sample.exe"/>
      <add key="App1" value="MyApp"/>
      <add key="App1E" value="MyApp.exe"/>
      <add key="App2" value="MyApp2"/>
      <add key="App2E" value="MyApp2.exe" />
      <add key="AppDirectory" value="Company\MyProject" />
      <add key="CMDArgs" value="\start"/>
</appSettings>    
      <system.diagnostics>
        <sources>
          <source name="ServiceTrace" switchName="ServiceTraceSwitch" switchType="System.Diagnostics.SourceSwitch">
            <listeners>
              <add name="ServiceLog" type="System.Diagnostics.TextWriterTraceListener" initializeData="servicetrace.log"/>
            </listeners>
          </source>
        </sources>
        <switches>
          <add name="ServiceTraceSwitch" value="Information" />
        </switches>
        <trace autoflush="true" indentsize="4"></trace>
      </system.diagnostics>

    </configuration>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T07:34:51+00:00Added an answer on June 5, 2026 at 7:34 am

    Seems that your app.config (or .exe.config) contains an unrecognized section. The error message usually says something like

    Unrecognized configuration section ‘section name’

    so i assume that you just added your config values without the needed parent element. The element has to be added as a child element of the section. Make sure it looks something like this:

    <configuration>
       <appSettings>
         <add key="MyKey" value="MyValue" />
       </appSettings>
       ...some more configuration...
    </configuration>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a service that when installed puts the Myapp.exe.config file (generated based of
I have a windows service (C#) installed on a server that launches every 10
I have a windows service that is already installed on a server, and I
I have a Windows service that I'd like to gather some debugging data on
Ok, I am trying to print a page from a windows service that I
I have a windows service which is installed to C:\Windows\System32. It has a usual
I am quite new to windows form app development. I have an app installed
I have a .NET Windows serivce protected with {smartassembly} which works fine, except that
I have windows service that's select some records. And it works like this: using
I have code written in .NET that only fails when installed as a Windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.