473,326 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

ConfigurationManager.OpenExeConfiguration opening wrong file?

Hi,

I have an application that loads various settings from the
app.exe.config file. This has worked very well on w2k, XP, and
Vista.

However, recently I've been troubleshooting an issue on Windows Home
Server (which is based on some variation of Windows Server 2003) and
I've found that
ConfigurationManager.OpenExeConfiguration(Configur ationUserLevel) is
opening the wrong file. Not only is it opening the wrong file, but
it's a file that doesn't even exist in the directory.

For example, I installed our application to:

C:\Program Files\My App Name\app.exe

....along with all of the supporting files, and our config file,
app.exe.config. Normally, I see
ConfigurationManager.OpenExeConfiguration return a local user
configuration path of C:\Program Files\My App Name\app.exe.config.
However, under Windows Server 2003, the call returns C:\Program Files
\My App Name\app.config which is a file that:

1. Doesn't exist, and
2. Doesn't contain any of the configuration information that my
application needs to function.

For both calls, the parameter is ConfigurationUserLevel.None.

I haven't tried loading our application on Windows Server 2003 to see
if the issue also reproduces there. I did some searching to see if
people have had any previous problems with OpenExeConfiguration, and
it seems like a lot of people have had problems where an extra
".config" was appended (e.g. it returns "app.exe.config.config") but I
haven't seen any reports of it omitting the ".exe".

Does anyone have any idea what's going on here? Thanks in advance.

Jul 19 '07 #1
0 5743

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mark Ingram | last post by:
Hi all, having a real struggle using the ConfigurationManager class, i want to be able to save user specific information to the configuration file, i try to use: Configuration config =...
4
by: Janiek Buysrogge | last post by:
Hello, Can somebody please tell me how I can read values from the following configuration file. It is generated by VS 2K5 Express when I add settings using the project properties front-end: ...
1
by: fran | last post by:
I have this code: System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration("SAS.Int.ComunServicios.ComunProcesos.dll"); The filepath is not useful for me. If I...
3
by: Mark | last post by:
I am trying to read the appsettings section of a configuration file using the ConfigurationManager object (ASP.NET application) with the following three lines but for some reason the...
2
by: Johnny Jörgensen | last post by:
I don't get the ConfigurationManager object. All I want to do is store my application settings and retrieve them on the next run. I instantiate the Configuration: static private Configuration...
2
by: remya1000 | last post by:
i'm using VB.NET 2003. Last time while i did a program in Vb.Net 2005, i use "Configuration". and i could read and write to that XML configuration file like the example below. CODES:...
0
by: =?Utf-8?B?Vm9ubGFy?= | last post by:
My app.config file has the setting <MySection file="My.config"> When I use "System.Configuration.ConfigurationManager.GetSection(SectionName)" it correctly reads from the My.config file for...
3
by: Jeff | last post by:
I have a solution with two projects. Project A is the startup project, while Project B serves as the project with the data logic. At run time, the first thing I need to do is write to Project...
0
by: Tom | last post by:
This seems odd ... While debugging my application in VS2008, I can successfully retrieve values from my configuration file doing the following: string bla = ConfigurationManager.AppSettings; ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.