WCF Distributed Development Common error: Unrecognized attribute ' targetframework ' (unrecognized property ' targetframework ')
I'm using the VS2010 and. NET Framework 4.0. A simple WCF service was developed, and this error occurred when deploying to IIS6.
Unrecognized attribute ' targetframework '.
"1" error message:
The information for the WCF service's configuration file is as follows:
<compilation debug="true" targetFramework="4.0">
<assemblies>
</assemblies>
</compilation>
"2" Error screenshot:
"3" Reason analysis:
This error is caused by an incorrect version of. NET Framwork, and the nodes in the configuration file cannot be recognized.
"4" Solution:
In the Web site properties of ASP. NET in the set version is. NET in IIS > right click on WebSite > Properties > ASP.net > Version > "4.0.21006" is not 2.0.
Iis6> Select Site->-> properties-> asp.net-> version-> "4.0.21006". As shown in the figure:
Resources:
1.http://forums.asp.net/t/1491204.aspx
2.http://social.microsoft.com/forums/zh-cn/wcfzhchs/thread/663531f6-5466-4c2b-8450-73135137756b/? Prof=required