只是想说一下,2011 年 4 月版的Visual Studio 2010 身份开发人员培训工具包已经过时了。这会给实验室带来问题。例如,我在练习 2 中报告了以下问题:接受来自活动目录联邦服务 (ADFS) STS 的令牌:
“名称为 'CN=ip-sts-01.federatedidentity.net' 的服务器证书未能通过身份验证,因为其指纹('DE74CFE7D20E8DC2B6E6E700E4D2A940CB08B268')与端点身份中指定的指纹('50191FA07A8F79D4220E551DF4B97F31519D012D')不匹配。当前 HTTPS 请求失败。请更新客户端使用的端点标识或服务器使用的证书。”
与 Visual Studio 2010 开发人员的 Web 服务和身份相关的练习(上次更新时间为 2011 年 8 月 25 日,这很奇怪,后来已经过时了),要求学员在 WeatherStationClient 的 app.config 中插入以下行:
<issuer address="https://ip-sts-01.federatedidentity.net/adfs/services/trust/13/usernamemixed"
bindingConfiguration=
"https://ip-sts-01.federatedidentity.net/adfs/services/trust/13/usernamemixed"
binding="ws2007HttpBinding">
<identity>
<certificate encodedValue="
MIIGKjCCBRKgAwIBAgIKKwWMagAFAAF3hDANBgkqhkiG9w0BAQUFADCBizETMBEGCgmSJomT8ixkARkWA2NvbTEZMBcGCgmS
JomT8ixkARkWCW1pY3Jvc29mdDEUMBIGCgmSJomT8ixkARkWBGNvcnAxFzAVBgoJkiaJk/IsZAEZFgdyZWRtb25kMSowKAYD
VQQDEyFNaWNyb3NvZnQgU2VjdXJlIFNlcnZlciBBdXRob3JpdHkwHhcNMTAwMzI0MTcwNTI3WhcNMTEwMjE5MTgyNDUzWjB4
MQswCQYDVQQGEwJVUzELMAkGA1UECBMCd2ExEDAOBgNVBAcTB3JlZG1vbmQxEjAQBgNVBAoTCW1pY3Jvc29mdDEMMAoGA1UE
CxMDaWRhMSgwJgYDVQQDEx9pcC1zdHMtMDEuZmVkZXJhdGVkaWRlbnRpdHkubmV0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB
iQKBgQCqQB1CIW67PoTYJPc5wgjF9qtyKHToKVesfMPgE5oNtg+d47DAHllO0vCGvhWmsaJhbimLX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SkuY3J0MD8GCSsGAQQBgjcVBwQyMDAGKCsGAQQB
gjcVCIPPiU2t8gKFoZ8MgvrKfYHh+3SBT4PC7YUIjqnShWMCAWQCAQYwJwYJKwYBBAGCNxUKBBowGDAKBggrBgEFBQcDAjAK
BggrBgEFBQcDATANBgkqhkiG9w0BAQUFAAOCAQEAX3OLpn7dtTwxUdTbUQQpkmBDVgwOItpIuIykQw8ab7y94weVBkF58DX5
KoZ+44eEq9kDh/LKBA5ncTrrNKc8TRypjBM1JgvaP+7WDStb4ll07r8Ka7Zskb+4RGFnZDVP91zMq6aw7C63UHCMQCMv4K7a
mKuq+dxJEEp+BCRyiMhbt0QQAY2Fv+IrEf/unLvV/TheZ7J5meKLV4tvZaAU4zFzHbfaZ1tGSr6ldhkL92Qqs8WF1nRfPyq3
Jk+616KVZXyluBhDoK6sCGJdCzmP+CWhaOprCbPrM5GAFSig7TUTQymi87SNAM9H1dVaIfSysjc9BjhnhFm7HsINtj6S1g==
" />
</identity>
</issuer>
问题是此编码值中包含的证书自 2011 年 2 月 19 日以来已过期。他们确实在服务器上放置了一个新证书,但忘记更新练习描述。
为了让它工作,而不是上面建议的片段,使用:
<issuer address="https://ip-sts-01.federatedidentity.net/adfs/services/trust/13/usernamemixed"
bindingConfiguration="
https://ip-sts-01.federatedidentity.net/adfs/services/trust/13/usernamemixed"
binding="ws2007HttpBinding">
<identity>
<certificate
encodedValue="MIIF5jCCBM6gAwIBAgIKTPVCpAAIAAH4kDANBgkqhkiG9w0BAQUFADCBizETMBEGCgmSJomT8ixkARkWA
2NvbTEZMBcGCgmSJomT8ixkARkWCW1pY3Jvc29mdDEUMBIGCgmSJomT8ixkARkWBGNvcnAxFzAVBgoJkiaJk/IsZAEZFgdy
ZWRtb25kMSowKAYDVQQDEyFNaWNyb3NvZnQgU2VjdXJlIFNlcnZlciBBdXRob3JpdHkwHhcNMTEwMjI4MTgyNTU0WhcNMTM
wMjI3MTgyNTU0WjAqMSgwJgYDVQQDEx9pcC1zdH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lMjBTZXJ2ZXIlMjBBdXRob3JpdHkoOCkuY3JsMIG/BggrBgEFBQcBAQS
BsjCBrzBeBggrBgEFBQcwAoZSaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9tc2NvcnAvTWljcm9zb2Z0JTIwU2VjdX
JlJTIwU2VydmVyJTIwQXV0aG9yaXR5KDgpLmNydDBNBggrBgEFBQcwAoZBaHR0cDovL2NvcnBwa2kvYWlhL01pY3Jvc29md
CUyMFNlY3VyZSUyMFNlcnZlciUyMEF1dGhvcml0eSg4KS5jcnQwDQYJKoZIhvcNAQEFBQADggEBAODoj1Oh3FYsizwaDPKs
o3LGCGd9XTZtbDI/yB2QVWFWBN5OHVYMAhukXXZjtjGL9yNlPbl+ImP+BI//bAfQCuubavesBbf3wFtGJ7hpPpiKwhkKsLE
KwldGrNAoSC2W6QFHCFhu0AjdO3GM8CQsqQ2cSAo6lWC+FNW1odZl0s6BqRTIsklFMHmqW7gmZwUbQCcjdiBx1KyzGttMt5
4mcH21QWeuICKGM/2cQdLVZOG+XpsSW00m0+lcUQeN/ZJ+S7j66gntc4dj8bdMMMzr3+zuoSd75Dv4qjsSnEc9KeXYTeDqc
3e14RUkA0q+MjB88BX3DtzmSpZBQ6txlwV8R+U=" />
</identity>
</issuer>
这是指托管在 ip-sts-01.federatedidentity.net 上的新服务器证书。这对我有用!
希望它可以帮助你们中的一些人通过实验室,
马可