Document directory
Problem
When the WCF 3.5 client program is developed with VS2008 on Windows 7, VS will be inserted in the xxxBinding/security/transport Section of the automatically generated configuration file
<ExtendedProtectionPolicy policyEnforcement = "Never"/>
If you deploy this program to another operating system, the following error occurs: Unrecognized element "extendedProtectionPolicy" (Unrecognized element extendedProtectionPolicy ).
Cause
This is a known problem. It only exists on Windows 7, and it seems that Windows 7 has. NET 3.5 Special extensions, but not supported by other earlier versions of the operating system. The following is an explanation from the WCF Team:
Thank you for contacting us with your question.
Windows 7 has an additional security feature called Extended Protection. when you create an app. config for a client from the Windows 7 service, the tag "extendedProtectionPolicy" will be present in the app. config. when deploying the client to versions of Windows prior to Windows 7, this tag will not be valid. this is a known issue. this tag is not actually used by the client, so simply remove the tag. we will try to update future versions.. Net 3.5 to not include this tag in the generated app. config.
Thanks,
WCF Team
Solution
Remove the node directly.
This problem has been solved in. NET 4.0 and will not be automatically added to this node.
FW: WCF error: Unrecognized element "extendedProtectionPolicy"
--------------------------------------------------------------------
New SearchBestBetClient (EndpointConfigurationName, adminServicesSettings. AdminServiceUrl)
'New SearchBestBetClient (EndpointConfigurationName, adminServicesSettings. AdminServiceUrl) 'threw an exception of type 'System. Configuration. ConfigurationErrorsException'
Base {System. configuration. configurationException }:{ "Unrecognized element 'extendedprotectionpolicy '. (C :\\ Inetpub \\ wwwroot \\ wss \\ VirtualDirectories \ 8090 \ web. config line 312 )"}
BareMessage: "Unrecognized element 'extendedprotectionpolicy '."
Errors: {System. Configuration. ConfigurationException [0x00000001]}
Filename: "C :\\ Inetpub \ wwwroot \ wss \ VirtualDirectories \ 8090 \ web. config"
Line: 0x00000138
Message: "Unrecognized element 'extendedprotectionpolicy'. (C: \ Inetpub \ wwwroot \ wss \ VirtualDirectories \ 8090 \ web. config line 312 )"