473,385 Members | 2,029 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,385 software developers and data experts.

config file literally "consumed"

I'm encountering a strange situation with a .config file
for a simple windows form test harness I built to test
some components normally invoked by a windows service.

My config file, "testharness.exe.config," has some
<system.diagnostics> settings (trace listeners).

When my file is read only, things are fine. However, when
I toggle the read-only attribute off (so I can edit it),
and then run my test harness, as soon as I get to the very
first line of execution ...

static void Main()
{
Application.Run(new Form1());
}

.... my .config file is deleted from the folder!!!

I'm really confused by this behavior, which I've never
observed before.

What's changed on my box is I removed v 1.0.3705 (under
which my service previously had been compiled) and
installed v 1.1.4322, as well as the VS 2003 IDE.

On a hunch I changed a couple attributes in the
<processModel> node of my machine.config file ... set
username and password to a domain account (from "machine"
and "AutoGenerate") and rebooted, but this didn't make any
difference.

Anyone have any ideas?
TIA,
Paul Klanderud
Am I missing something very basic?
Jul 19 '05 #1
2 2182
Paul,
Microsoft fixed a 'feature' of VS.NET 2002 in VS.NET 2003. :-|

You need to add your config file to your VS.NET project's root folder as
app.config, it needs to be named "app.config" without the quotes. When you
build your project VS.NET (both 2002 & 2003) will copy the app.config file
from the project root to your output folder and name it appropriately
(myproject.exe.config).

Hope this helps
Jay

"Paul Klanderud" <co*********@nospamhotmail.com> wrote in message
news:0c****************************@phx.gbl...
I'm encountering a strange situation with a .config file
for a simple windows form test harness I built to test
some components normally invoked by a windows service.

My config file, "testharness.exe.config," has some
<system.diagnostics> settings (trace listeners).

When my file is read only, things are fine. However, when
I toggle the read-only attribute off (so I can edit it),
and then run my test harness, as soon as I get to the very
first line of execution ...

static void Main()
{
Application.Run(new Form1());
}

... my .config file is deleted from the folder!!!

I'm really confused by this behavior, which I've never
observed before.

What's changed on my box is I removed v 1.0.3705 (under
which my service previously had been compiled) and
installed v 1.1.4322, as well as the VS 2003 IDE.

On a hunch I changed a couple attributes in the
<processModel> node of my machine.config file ... set
username and password to a domain account (from "machine"
and "AutoGenerate") and rebooted, but this didn't make any
difference.

Anyone have any ideas?
TIA,
Paul Klanderud
Am I missing something very basic?

Jul 19 '05 #2
Jay,

Thanks a ton!! I couldn't find anything on this "fix"
anywhere, and was just wondering if I'd royally screwed up
my machine with the install.

Thanks again!

Paul
-----Original Message-----
Paul,
Microsoft fixed a 'feature' of VS.NET 2002 in VS.NET 2003. :-|
You need to add your config file to your VS.NET project's root folder asapp.config, it needs to be named "app.config" without the quotes. When youbuild your project VS.NET (both 2002 & 2003) will copy the app.config filefrom the project root to your output folder and name it appropriately(myproject.exe.config).

Hope this helps
Jay

"Paul Klanderud" <co*********@nospamhotmail.com> wrote in messagenews:0c****************************@phx.gbl...
I'm encountering a strange situation with a .config file
for a simple windows form test harness I built to test
some components normally invoked by a windows service.

My config file, "testharness.exe.config," has some
<system.diagnostics> settings (trace listeners).

When my file is read only, things are fine. However, when I toggle the read-only attribute off (so I can edit it),
and then run my test harness, as soon as I get to the very first line of execution ...

static void Main()
{
Application.Run(new Form1());
}

... my .config file is deleted from the folder!!!

I'm really confused by this behavior, which I've never
observed before.

What's changed on my box is I removed v 1.0.3705 (under
which my service previously had been compiled) and
installed v 1.1.4322, as well as the VS 2003 IDE.

On a hunch I changed a couple attributes in the
<processModel> node of my machine.config file ... set
username and password to a domain account (from "machine" and "AutoGenerate") and rebooted, but this didn't make any difference.

Anyone have any ideas?
TIA,
Paul Klanderud
Am I missing something very basic?

.

Jul 19 '05 #3

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

Similar topics

5
by: Geoffrey | last post by:
Hope someone can help. I am trying to read data from a file binary file and then unpack the data into python variables. Some of the data is store like this; xbuffer:...
19
by: les_ander | last post by:
Hi, suppose I am reading lines from a file or stdin. I want to just "peek" in to the next line, and if it starts with a special character I want to break out of a for loop, other wise I want to...
4
by: Kevin Goodsell | last post by:
The return value of sscanf should be "the number of input items assigned" (unless an input failure occurs before any conversion). Are items assigned due to a "%n" directive included in the returned...
12
by: Assaf | last post by:
Hi all, My client is using an online service provider that processes survey responses. After a user fills survey.aspx and presses the OK button, 2 things need to happen: 1. the data has to...
2
by: Kunk | last post by:
Hi All, I was curious if an exception is generated with the .ReadLine() function (found in the StreamReader class), will the current line be consumed? Thus the next .ReadLine() will start at the...
6
by: Paul Klanderud | last post by:
I'm encountering a strange situation with a .config file for a simple windows form test harness I built to test some components normally invoked by a windows service. My config file,...
2
by: zahaby | last post by:
Is it applicable to use the Microsoft Enterprise Library in Logging without using the configuration tool ? I would like to configure and choose the trace listener programmatically . Thanks in...
30
by: kj | last post by:
My book (Flanagan's JavaScript: The Definitive Guide, 5th ed.) implies on page 111 that the following two constructs are equivalent: ( x.constructor == Foo ) and ( x instanceof Foo ) The...
8
by: clyfish | last post by:
In cmd, I can use find like this. C:\>netstat -an | find "445" TCP 0.0.0.0:445 0.0.0.0:0 LISTENING UDP 0.0.0.0:445 *:* C:\> And os.system is OK....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.