ASP.NET the targetframework attribute is not allow

2019-07-15 06:44发布

问题:

I have these lines in my web.config:

<httpRuntime maxRequestLength="5120000" executionTimeout="54000" requestValidationMode="2.0" targetFramework="4.5"/>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.5">

But on the httpRuntime element I get the design time error the targetframework attribute is not allowed

The strange thing is that this occurs on my local development machine and other sites on it work fine with these definitions in their respective web.config files. All sites are using the same application pool. ASP.NET4.5 is installed (I double checked using the Microsoft Web Installer tool)

I checked here and here and here already

All other posts recommend installing ASP.NET4.5 on the server, but that has been done by me already. What else can I check?