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 8762971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:40:11+00:00 2026-06-13T15:40:11+00:00

I have a WCF Library and I’m trying to host it within a Windows

  • 0

I have a WCF Library and I’m trying to host it within a Windows Service.

When testing just the Library with WCF Test Client all is well. In my Library project I have an app.config with <connectionStrings> in the <configuration> element. I am specifying the location of a local database like so:

data source=C:\test\smMonitorLocalDB.sdf;

I have copied everything from the app.config in my Library project to the app.config in my Windows Service project EXCEPT the <connectionStrings> section. Because, if I add that <connectionStrings> section, my Windows Service won’t start.

If I leave out the <connectionStrings> section, my Windows Service starts just fine. It also works just fine ( except the parts of it that depend on the <connectionStrings> ).

So my question is: where should I be adding my <connectionStrings>? Or is there a better way for me to be going about this?

  • 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-13T15:40:14+00:00Added an answer on June 13, 2026 at 3:40 pm

    It turns out that the app.config file is only read when the Windows Service is INSTALLED. I had originally assumed that if the Windows Service was restarted that it would re-read the app.config.

    If you are having difficulty trying to figure out why your Windows Service isn’t starting, check out the EventViewer, you may have some logs there.

    It is very difficult to debug a Windows Service if it is not started, but it is possible. Check out this SO post if you’re having trouble.

    Thanks to @J0HN for your help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a wcf service library that is hosted in a windows service. I
I have WCF Class library, WCF Service Client and WCF Service Server in one
I have WCF Service Library implemented in Fluent NHibernate and hosted under Windows Service.
I have been working on a WCF service library where hopefully all the business
Introduction : I have a Server [ WCF service library ] and Client [
My WCF service library, the console host for the service, and the client are
I have a WCF service library project. I am trying to generate a wsdl
I have a WCF Service Library (implemented using NH) with one of the class
I currently have a WCF Service Library which will be started through a Console
I am creating solution and inside I have three projects: A WCF Service Library

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.