Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / December 2007

Tip: Looking for answers? Try searching our database.

ConfigurationSettings.AppSettings always returns null

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew Hayes - 27 Dec 2007 06:46 GMT
I'm not using One Touch or OpenNetCF, so none of the workarounds offered by
those search results work.

What I do have is a .NET 1.1 EXE which runs as a service on a machine
without IIS, and it used to work fine until I had to install .NET 2.0 because
of another application being installed. Now the call to
ConfigurationSettings.AppSettings always returns NULL.

I've tried adding the AppSettings section to the .NET 2.0. machine.config
and web.config files but with no change in the result. I've also tried
creating the appname.exe.config file in the same folder as the EXE, but that
doesn't help either.

Yes, I know ConfigurationSettings.AppSettings is obsolete so I should really
change the code and recompile it but I don't have VS 2005 (what's the point
of upgrading now when VS 2008 is just around the corner?)

So can anyone tell me where ConfigurationSettings.AppSettings is looking
when both .NET 1.1 and .NET 2.0 are installed? Or any other workaround that
would actually work?
Alan Samet - 28 Dec 2007 05:22 GMT
On Dec 27, 1:46 am, Andrew Hayes
<AndrewHa...@discussions.microsoft.com> wrote:
> I'm not using One Touch or OpenNetCF, so none of the workarounds offered by
> those search results work.
[quoted text clipped - 16 lines]
> when both .NET 1.1 and .NET 2.0 are installed? Or any other workaround that
> would actually work?

AppDomain.CurrentDomain.SetupInformation.ConfigurationFile

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.