473,387 Members | 1,859 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.

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 comes up with an error 'Exception in configuration section handler'

Line 38: </businessStream>
Line 39:
Line 40: <system.diagnostics>
Line 41: <switches>
Line 42: <add name="MainSwitch" value="4"/>
<system.diagnostics>
<switches>
<add name="MainSwitch" value="4"/>
</switches>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="myListenere" type="System.Diagnostics.TextWriterTraceListener"
initializeData="c:\myListener.log" />
</listeners>
</trace>
</system.diagnostics>

<system.web>
<compilation defaultLanguage="c#" debug="false" />
<trace enabled="false" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Windows" />
<authorization>
<allow users="*" />
</authorization>
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>

Cheers

Ollie Riches
http://www.phoneanalyser.net

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a programmer
helping programmers.
Nov 16 '05 #1
2 1402
got it working....

You have to place the <system.diagnostics> tage after the <system.web> tag

Ollie

"Ollie Riches" <ol**********@phoneanalser.net> wrote in message
news:#z**************@tk2msftngp13.phx.gbl...
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 comes up with an error 'Exception in configuration section handler'

Line 38: </businessStream>
Line 39:
Line 40: <system.diagnostics>
Line 41: <switches>
Line 42: <add name="MainSwitch" value="4"/>
<system.diagnostics>
<switches>
<add name="MainSwitch" value="4"/>
</switches>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="myListenere" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\myListener.log" />
</listeners>
</trace>
</system.diagnostics>

<system.web>
<compilation defaultLanguage="c#" debug="false" />
<trace enabled="false" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Windows" />
<authorization>
<allow users="*" />
</authorization>
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>

Cheers

Ollie Riches
http://www.phoneanalyser.net

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a programmer
helping programmers.

Nov 16 '05 #2
I also had to grant permissions for the 'NETWORK SERVICE' account to write
to the location question

Ollie

"Ollie Riches" <ol**********@phoneanalser.net> wrote in message
news:eS**************@TK2MSFTNGP09.phx.gbl...
got it working....

You have to place the <system.diagnostics> tage after the <system.web> tag

Ollie

"Ollie Riches" <ol**********@phoneanalser.net> wrote in message
news:#z**************@tk2msftngp13.phx.gbl...
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 comes up with an error 'Exception in configuration section handler'

Line 38: </businessStream>
Line 39:
Line 40: <system.diagnostics>
Line 41: <switches>
Line 42: <add name="MainSwitch" value="4"/>
<system.diagnostics>
<switches>
<add name="MainSwitch" value="4"/>
</switches>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="myListenere"

type="System.Diagnostics.TextWriterTraceListener"
initializeData="c:\myListener.log" />
</listeners>
</trace>
</system.diagnostics>

<system.web>
<compilation defaultLanguage="c#" debug="false" />
<trace enabled="false" requestLimit="10" pageOutput="true"
traceMode="SortByTime" localOnly="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Windows" />
<authorization>
<allow users="*" />
</authorization>
<sessionState mode="InProc"

stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false" timeout="20" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
</system.web>

Cheers

Ollie Riches
http://www.phoneanalyser.net

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a programmer helping programmers.


Nov 16 '05 #3

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

Similar topics

0
by: PJdotnet | last post by:
Hi, I'm trying to use out of the box "XmlSerializerSectionHandler" section handler (without doing any custom section handler devlopment) and although I've gone thruogh all the CMAB documentation...
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...
5
by: Prince | last post by:
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...
2
by: murl | last post by:
Below is what i have as the custom section in the web.config file... <?xml version="1.0" encoding="utf-8" ?> <configuration> <!-- register local configuration handlers --> <configSections>...
1
by: eje | last post by:
I want to use configSections for applicationsettings but I get Exception creating section handler. My code in web.config: <configuration> <configSections> <sectionGroup...
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...
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: =?Utf-8?B?TWF0dCBDYWxob29u?= | last post by:
Hi there, I have a new server that we are adding to our web cluster. This server has Windows Server 2003 32-bit Service Pack 1 installed. We have .NET 1.1 and 2.0 on this machine. A web...
1
by: =?Utf-8?B?QnJldHQgT3NzbWFu?= | last post by:
I'm trying to set up a custome e-mail publisher for a web app using the Microsoft Exception Management Application Block for .NET sample app. Our app already uses the Exception Management Block,...
7
by: =?Utf-8?B?RG91Z2llIEJyb3du?= | last post by:
Hi I've written custom configuration section (inherits from System.Configuration.ConfigurationSection) to simplify the contents of the config file and to make life easier when accessing them in...
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: 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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.