I just deployed an asp.net web app I have been working on to a new dev machine. It's a 4.0 project converted from 3.5. For some reason, I get the following error when I try to hit the site via my IIS website under the Default Website:
Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
It lists this as being a config error on the ASP.NET error page:
<compilation debug="true" targetFramework="4.0"/>
However, I notice that at the bottom of the error page, the version information indicates that it is using version 2 instead of version 4. Anyone have ideas about how to fix this?
I have made sure that my default website usese a .net 4 / integrated app pool and i cycled iis after this change was made. Still not luck. Here is my entire web.config file:
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings>
<add name="EventMasterConnectionString" connectionString="Data Source=localhost;Initial Catalog=BashBidder;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" targetFramework="4.0">
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
</configuration>
Thanks for the help!