web.config编译报错

<system.web>
    <compilation debug="true" targetFramework="4.0"/>
</system.web>

 

the TargetFramework property is accepted since framework 4.0 and it let you target previous frameworks (3.5, 3, 2).
If you were using vs2008, you would have an option to point to a different framework (from 2.0 to 3.5) via project properties.
But if you have only VS 2005, you do not have that option. By default, the vs2005 will lead to a project that points to 2.0 framework.
You should change taht line with:

Code:
<compilation debug="true" />

here http://msdn.microsoft.com/en-us/libr...(v=vs.80).aspx
(and be sure you point to version 2.0 of framework)
you can see which keywords are allowed and what you could set