<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="ConnectionInfo" value="server=127.0.1.1;database=Info_mgmt;Integrated Security=SSPI"/>
</appSettings>
<connectionStrings>
<add name="Info_mgmtConnectionString" connectionString="Data Source=daffodils\sqlexpress;Initial Catalog=Info_mgmt;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<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>
Err开发者_如何学Cor:
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 attribute 'targetFramework'. Note that attribute names are case-sensitive.
Source Error:
Line 7: Line 8: Line 9: Line 10: Line 11:
Source File: D:\Infopass\Infopass-Web\Infopass-Web\web.config Line: 9
The targetFramework attribute is specified on the <compilation> element under <system.web>. I have seen that error message when running sites in IIS 7.5 using ASP.NET 2.0 instead of ASP.NET 4.0. If this site is in IIS, then check the Application Pool the site is running under to make sure the Application Pool is using the .NET 4.0 Framework (instead of .NET 2.0 Framework).
Similarly, if you are attempting to run the site from the default web server in Visual Studio and you are seeing this error, you'll want to make sure the Target Framework for the project is set to .NET Framework 4.0 (under Properties > Build > Target Framework).
You need to set your application to use .Net 4.0 in IIS.
精彩评论