Help with web.config

  • Thread starter Thread starter SirPoonga
  • Start date Start date
S

SirPoonga

I want to put this in my web.config
<compilation debug="false" defaultLanguage="vb"/>

Can I put that in a local web.config.
I added that line in my web.config (which also contains appsettings).
However I get this error:
I even read
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=307


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: Unrecognized configuration section 'compilation'


Source Error:



Line 13: <add key="indexheader" value="Index" />
Line 14: </appSettings>

Line 15: <compilation debug="true" defaultLanguage="vb"/>
Line 16: </configuration>
 
The reason for that error message is that the line
<compilation debug="true" defaultLanguage="vb"/>
does not belong in the <configuration> section.

Place that line under
<system.web>
<compilation defaultLanguage="c#" debug="true" />

and everything will be OK.




Juan T. Llibre
ASP.NET MVP
===========
 
Back
Top