?
Solved

ASP.net Web.Config Parser Error Message: Child Nodes Not Allowed

Posted on 2007-09-28
6
Medium Priority
?
8,470 Views
Last Modified: 2009-05-07
I'm getting the following error whenever I try to access my pages:

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Child nodes not allowed.

Source Error:


Line 14:                   <compilers>
Line 15:                         <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4" compilerOptions="/warnaserror-">
Line 16:                               <providerOption name="CompilerVersion" value="v3.5"/></compiler>
Line 17:                         <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" compilerOptions="/optioninfer+">
Line 18:                               <providerOption name="CompilerVersion" value="v3.5"/></compiler></compilers></system.codedom>
 

Source File: \\shared.hosting.local\nfs\cust\0\09\78\787900\web\web.config    Line: 16


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

How do I fix this?  My site is currently down...

--Christian
0
Comment
Question by:cmerlo1
  • 4
  • 2
6 Comments
 
LVL 23

Accepted Solution

by:
Christopher Kile earned 2000 total points
ID: 19981203
The <compiler> element does not allow child elements.  However, the following line occurs twice in that section of your Web config you've shown me, both times between the beginning and ending tags of <compiler> elements:

<providerOption name="CompilerVersion" value="v3.5"/>

Both of these lines should be removed immediately.  
0
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 19981212
Sorry, when I wrote "line" I meant "element".
0
 
LVL 4

Expert Comment

by:jazjef
ID: 24321163
ANOTHER SOLUTION:

1) Make a copy of your webconfig.

2) Delete the webconfig from your project.

3) Reset your connection strings for your SQL datasources

4) Run debugger and recuild your webconfig.

I had this problem with Visual Web Developer 2008 projects created at work that don't play nicely with Visual Web Developer 2005 installed on my machine at home. This solves my problem every time.

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 23

Expert Comment

by:Christopher Kile
ID: 24322074
jazief,

I'll remember your technique for clearing web.configs that are incompatible going from VS2008 to VS2005...but the problem statement doesn't even mention SQL datasource access.  This was a very specific problem that was solved by one step:

1.  Delete the two illegal <providerOption> elements.

Why use four steps when one will do?
0
 
LVL 4

Expert Comment

by:jazjef
ID: 24322608
RE: "Why use four steps when one will do?"

Your simple two-step solution doesn't work for me---I tested it.....but my solution works for me. I mentioned SQL datasources because deleting a webconfig also deletes any connection strings that may be included in the webconfig-----you knew this right?

Why assume your solution is the only answer to the problem. Different issues can in fact return the same types of error messages, thus requiring different types of solutions.

I was trying to be helpful to passers-by who may not have success with your situation-specific one-dimensional solution to this error message.

0
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 24325089
jazief,

I was trying to be kind.  Your "solution" isn't a solution to THIS problem at all.  It's completely irrelevant to the specific problem the original asker was asking.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.
Suggested Courses
Course of the Month14 days, 8 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question