473,387 Members | 1,899 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,387 software developers and data experts.

Exception in configuration section handler (Trace)

Hai all,

I got this exception in my application and that occurs in the
follwing line..

Trace.WriteLine("Text");

{@"Exception in configuration section handler (D:\Program
\stringoperation\bin\Debug\stringoperation.exe.con fig line 12)" }

I defined the trace in app.config as follows

<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="d:\\Program\\stringoperation\\doc\ \stringoperation.txt"
/>
<remove type="System.Diagnostics.DefaultTraceListener"/>
</listeners>
</trace>
</system.diagnostics>
Looking forward for ur reply...
Thanx in advance...

Nov 17 '05 #1
5 1887
The 'doc' directory does not exist :)

HTH

Ollie Riches

"Prince" <pr****************@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hai all,

I got this exception in my application and that occurs in the
follwing line..

Trace.WriteLine("Text");

{@"Exception in configuration section handler (D:\Program
\stringoperation\bin\Debug\stringoperation.exe.con fig line 12)" }

I defined the trace in app.config as follows

<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="d:\\Program\\stringoperation\\doc\ \stringoperation.txt"
/>
<remove type="System.Diagnostics.DefaultTraceListener"/>
</listeners>
</trace>
</system.diagnostics>
Looking forward for ur reply...
Thanx in advance...

Nov 17 '05 #2
"Prince" <pr****************@gmail.com> schrieb im Newsbeitrag
news:11**********************@g43g2000cwa.googlegr oups.com...
Hai all,

I got this exception in my application and that occurs in the
follwing line..

Trace.WriteLine("Text");

{@"Exception in configuration section handler (D:\Program
\stringoperation\bin\Debug\stringoperation.exe.con fig line 12)" }

I defined the trace in app.config as follows

<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="d:\\Program\\stringoperation\\doc\ \stringoperation.txt"
/>
<remove type="System.Diagnostics.DefaultTraceListener"/>
</listeners>
</trace>
</system.diagnostics>
Looking forward for ur reply...
Thanx in advance...

the app.config file is not a C#-programmfile, so you shouldn't use
escape-sequences like in C#.

try:
initiliazeData="d:\Programm\stringoperation\doc\st ringoperation.txt"

hth
Nov 17 '05 #3
Hi...

As u told I used single Backslash(\) but still it is showing the
exception...

Looking forward for ur reply...
Christof Nordiek wrote:
"Prince" <pr****************@gmail.com> schrieb im Newsbeitrag
news:11**********************@g43g2000cwa.googlegr oups.com...
Hai all,

I got this exception in my application and that occurs in the
follwing line..

Trace.WriteLine("Text");

{@"Exception in configuration section handler (D:\Program
\stringoperation\bin\Debug\stringoperation.exe.con fig line 12)" }

I defined the trace in app.config as follows

<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="myListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="d:\\Program\\stringoperation\\doc\ \stringoperation.txt"
/>
<remove type="System.Diagnostics.DefaultTraceListener"/>
</listeners>
</trace>
</system.diagnostics>
Looking forward for ur reply...
Thanx in advance...

the app.config file is not a C#-programmfile, so you shouldn't use
escape-sequences like in C#.

try:
initiliazeData="d:\Programm\stringoperation\doc\st ringoperation.txt"

hth


Nov 17 '05 #4
I ran your code snippet and it worked fine the only reason I can see it will
fail is if the directory does not exist.

HTH

Ollie Riches

"Prince" <pr****************@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Hi...

As u told I used single Backslash(\) but still it is showing the
exception...

Looking forward for ur reply...
Christof Nordiek wrote:
"Prince" <pr****************@gmail.com> schrieb im Newsbeitrag
news:11**********************@g43g2000cwa.googlegr oups.com...
> Hai all,
>
> I got this exception in my application and that occurs in the
> follwing line..
>
> Trace.WriteLine("Text");
>
> {@"Exception in configuration section handler (D:\Program
> \stringoperation\bin\Debug\stringoperation.exe.con fig line 12)" }
>
> I defined the trace in app.config as follows
>
> <system.diagnostics>
> <trace autoflush="true" indentsize="4">
> <listeners>
> <add name="myListener"
> type="System.Diagnostics.TextWriterTraceListener"
> initializeData="d:\\Program\\stringoperation\\doc\ \stringoperation.txt"
> />
> <remove type="System.Diagnostics.DefaultTraceListener"/>
> </listeners>
> </trace>
> </system.diagnostics>
>
>
> Looking forward for ur reply...
> Thanx in advance...
>

the app.config file is not a C#-programmfile, so you shouldn't use
escape-sequences like in C#.

try:
initiliazeData="d:\Programm\stringoperation\doc\st ringoperation.txt"

hth

Nov 17 '05 #5
hi Riches,

I made the destination folder as very simple as follows

initializeData = "c:\text.txt"
but still i am getting the exception...

Looking forward for ur reply...
Ollie Riches wrote:
I ran your code snippet and it worked fine the only reason I can see it will
fail is if the directory does not exist.

HTH

Ollie Riches

"Prince" <pr****************@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Hi...

As u told I used single Backslash(\) but still it is showing the
exception...

Looking forward for ur reply...
Christof Nordiek wrote:
"Prince" <pr****************@gmail.com> schrieb im Newsbeitrag
news:11**********************@g43g2000cwa.googlegr oups.com...
> Hai all,
>
> I got this exception in my application and that occurs in the
> follwing line..
>
> Trace.WriteLine("Text");
>
> {@"Exception in configuration section handler (D:\Program
> \stringoperation\bin\Debug\stringoperation.exe.con fig line 12)" }
>
> I defined the trace in app.config as follows
>
> <system.diagnostics>
> <trace autoflush="true" indentsize="4">
> <listeners>
> <add name="myListener"
> type="System.Diagnostics.TextWriterTraceListener"
> initializeData="d:\\Program\\stringoperation\\doc\ \stringoperation.txt"
> />
> <remove type="System.Diagnostics.DefaultTraceListener"/>
> </listeners>
> </trace>
> </system.diagnostics>
>
>
> Looking forward for ur reply...
> Thanx in advance...
>
the app.config file is not a C#-programmfile, so you shouldn't use
escape-sequences like in C#.

try:
initiliazeData="d:\Programm\stringoperation\doc\st ringoperation.txt"

hth


Nov 17 '05 #6

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

Similar topics

0
by: Ant Corrie | last post by:
I am at a loss as to why this is not working. I am trying to setup a TextWriterTraceListener in my application config file and then execute the app from the network. I get a security exception...
4
by: Jay | last post by:
I have authentication set for my site but I need one page to be an exception case. Namely my forgot password page. How do I tell the webconfig file to authenciate all pages except one page? ...
2
by: Ollie Riches | last post by:
I am trying to configure trace listeners in my web config file for an asp.net web service , but I seem to be having a problem. I'm hoping someone will be able to spot what I'm doing wrong... It...
0
by: EP | last post by:
I am hosting asp.net outside of IIS, and my workerrequest derived class is written in MC++. Whenever I make a request, I get the exception pasted below: Of course adding a trust element to the...
1
by: Ramanfromoz | last post by:
Hi, Developing a new we application. Everything okay on my local WIN XP PROFESSIONAL, IIS 5.0 running locally. The website is running smoothly. Now, the same code I am copying over to a...
2
by: Seth | last post by:
Ok, here is my setup. I have a fully functioning HTTP Handler implemented. The handler is supposed to handle every single request that comes in to a particular virtual directory. Thus, in IIS, I...
4
by: Rob Richardson | last post by:
Greetings! I am working on an application that targets a Pocket PC running Windows CE and SQL Server CE. Almost all functions in the application use a Try block with a Catch block that looks...
0
by: thehitman | last post by:
I used an article "Creating a Flexible Configuration Section Handler "(http://www.15seconds.com/issue/040504.htm). The Console application works with app.config but with the web.config. The...
1
by: Jess Chadwick | last post by:
I am attempting to use the Enterprise Library (Jan 2006) Cryptography block to encrypt a credit card number in my ASP.NET 2.0 Commerce Server application. Everything is configured correctly, as...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.