473,326 Members | 1,972 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.

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 2180
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
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.