Re: app.config is breaking my windows service?
- From: "sloan" <sloan@xxxxxxxxx>
- Date: Fri, 7 Mar 2008 14:21:36 -0500
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
.
- References:
- app.config is breaking my windows service?
- From: jason
- Re: app.config is breaking my windows service?
- From: sloan
- Re: app.config is breaking my windows service?
- From: jason
- app.config is breaking my windows service?
- Prev by Date: using And Try Catch in harmony
- Next by Date: Re: using And Try Catch in harmony
- Previous by thread: Re: app.config is breaking my windows service?
- Next by thread: Add blank line to LINQ
- Index(es):
Relevant Pages
|