Re: app.config is breaking my windows service?



Well, whichever way you figured it out..you got it. :)
That's the big thing!

(Of course its easy to see now .. that you've pointed it out)


I use the otherFile.config method...because alot of times in a
Service....there are settings which I will change from dev to production
and then there are settings I won't.

Because several people can alter the values...I can actually assign privs to
people as needed.
Instead of giving them the keys to the whole shabang.

So user1 can change connection strings.
User2 can only change app settings.

its anal, but sometimes in a large multi user environment, you need it.

I have WCF stuff as well, and I have those split out to different files.

I didn't like it at first, but like it now.

Aka, "Uh yeah, Junior Developer, why are you opening that file.. there's
nothing in there you need to change"

I can't do that with the entire app.config file when it has alot /lotta
stuff.

...



"jason" <iaesun@xxxxxxxxx> wrote in message
news:287357d5-5aaf-4017-a9cb-d8b42d4199be@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm an even bigger dork than I thought. It's always something
retarded. My app.config looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<add name="Database"
connectionString="Server=12.3.4.56;Database=mydb;uid=user;pwd=password;"/

</configuration>

Which is missing the <connectionStrings> element entirely! I changed
it to this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="Database"
connectionString="Server=12.3.4.56;Database=mydb;uid=user;pwd=password;"/

</connectionStrings>
</configuration>

And it worked just fine. Thanks for the suggestion though, I will keep
it in mind when it comes to deployment strategies!

And thanks to anyone else that corrects my oversight :)

Jason


.



Relevant Pages

  • Re: No functionality beyond startup screen
    ... Thanks alot. ... I clicked on the User interface core component in the ... >> configuration, and then settings, and it said there were no settings to ...
    (microsoft.public.windowsxp.embedded)
  • Re: Computer vs. User configuration
    ... "It is not that you can not configure a Group Policy with settings enabled ... Your explanation of a top level GPO with no override filtering down to ... scenario I can imagine having both user and computer configuration settings ...
    (microsoft.public.windows.group_policy)
  • Re: appsetting in class doesnt work
    ... an appsettings section. ... <!-- This section defines the logging configuration for ... Dim cnfg As System.Configuration.Configuration ... settings enter in the designer. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: appsetting in class doesnt work
    ... added an appsettings section. ... <!-- This section defines the logging configuration for ... Dim cnfg As System.Configuration.Configuration ... the settings enter in the designer. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: appsetting in class doesnt work
    ... added an appsettings section. ... <!-- This section defines the logging configuration for ... Dim cnfg As System.Configuration.Configuration ... and the settings enter in the designer. ...
    (microsoft.public.dotnet.languages.vb)