Thanks for response Travis.
It turns out my problem is that my config file was called App.Config. When in 
fact it should be called <myApp.exe.config> 
 
Interesting fact ............. 
 
Nick


"Falls, Travis D (HTSC, CASD)" <[EMAIL PROTECTED]> wrote:
If I remember that is correct for VB; C# it would be 
ConfigurationSettings.AppSetting["someName"];

do you have everything set up like this?  (Between the appSettings tags) 

<?xml version="1.0" encoding="utf-8" ?>
<configuration
      <appSettings>
            <add key="someName" value="someValue" />
      </appSettings>
</configuration>

Travis D. Falls | Consultant   RAFT.Net   IT | 860.547.4070 | [EMAIL PROTECTED]


-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED]
Sent: Monday, November 07, 2005 2:38 PM
To: [email protected]
Subject: [AspNetAnyQuestionIsOk] Reading App.Config from Windows Service


Hello Everyone, 

I have developed a Windows Service, however, I am unable to read from 
the app.config file. I do so by typing in 

ConfigurationSettings.AppSettings("DBConnStr") 

This statement works fine if I run it from a winforms application. On 
a note, I've verified the spelling and file is in the application's 
folder. 

Any ideas anyone ? 
TIA.

Nick








Yahoo! Groups Links








*************************************************************************
This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************



SPONSORED LINKS 
Java programming language 

---------------------------------
YAHOO! GROUPS LINKS 


    Visit your group "AspNetAnyQuestionIsOk" on the web.
  
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
  
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


---------------------------------



                
---------------------------------
Find your next car at Yahoo! Canada Autos

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to