Help with web.config

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>
 
J

Juan T. Llibre

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
===========
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top