Monday, June 14, 2010

WCF Client Error:: Can't find method: 'Boolean System.IdentityModel.Selectors.SecurityTokenRequirement. get_IsOptionalToken()'

Scenario: All of a sudden, all your WCF client projects stop working with the above error

Cause: This was due to a different version between System.ServiceModel.dll and System.IdentityModel.dll.

Solution: It can be solved be installing the following Quick Fix:

Win7 / Win2008 R2
KB-article: http://support.microsoft.com/kb/976462
Installer: http://code.msdn.microsoft.com/KB976462

Windows Xp/2K3/Vista/Win2K8
KB-article: http://support.microsoft.com/kb/976394
Installer: http://code.msdn.microsoft.com/KB976394

1 comment:

Anonymous said...

Thanks for the links, this fixed my issue.

Any idea what caused it to happen? My WCF client was working fine before the weekend, I came in this morning to this error.

Some Windows updates were installed over the weekend, it could be related to those...

Glad this service wasn't in production...