Single sign on 服务提供商ComponenetSpace标识提供商ADFS 2.0在为.Net应用程序启用SSO时出现问题

Single sign on 服务提供商ComponenetSpace标识提供商ADFS 2.0在为.Net应用程序启用SSO时出现问题,single-sign-on,claims-based-identity,saml-2.0,adfs2.0,federated-identity,Single Sign On,Claims Based Identity,Saml 2.0,Adfs2.0,Federated Identity,我正在为现有的.net应用程序启用SSO。我使用componentspace SAML 2.0组件作为服务提供程序(SP)和ADFS 2.0作为身份提供程序(IdP)。我已在不同的服务上配置了ADFS,SP位于不同的服务器上。我正在启动SP InitiateSo,并将浏览器重定向到IdP url,并根据中继方url将其返回给SP 在尝试获取时: SAMLServiceProvider.ReceiveSSO(Request, out isInResponseTo, out partnerIdP,

我正在为现有的.net应用程序启用SSO。我使用componentspace SAML 2.0组件作为服务提供程序(SP)和ADFS 2.0作为身份提供程序(IdP)。我已在不同的服务上配置了ADFS,SP位于不同的服务器上。我正在启动SP InitiateSo,并将浏览器重定向到IdP url,并根据中继方url将其返回给SP

在尝试获取时:

SAMLServiceProvider.ReceiveSSO(Request, out isInResponseTo, out partnerIdP, out userName, out attributes, out targetUrl); 
它的意思是“未配置合作伙伴身份提供程序”

在fiddler,我接到以下电话

  • /login.aspx?ReturnUrl=%2fDefault.aspx
  • /7月1日,北京市政府财政预算7月1日。7月1日,北京市政府财政预算7月1日,北京市政府财政预算7月1日,北京市政府财政预算7月1日,对ZVVZVVVZFFFF7 7 7 7 7 7 7 7 7 7 7 7 7 7 7月7日。7月7日,7 7 7月7日,7 7月7 7 7 7 7月7日,7 7 7 7 7月7 7 7月7日,7 7 7月7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7月7 7 7 7 7 7 7 7 7 7 7月7 7 7 7月7月7月7 7日,7 7月7 7 7 7 7 7 7 7 7 7 7 7 7 7 7月7月7 7月7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7月7 7 7月7月7月7月7 7月7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 FMFPU%2Bpl2KZtfzmvG1Xj%2.2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 JI47LSRO6QFOSPELP6ZXNZT0J6TvKS6P%2FBw%3D%3D&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=RxOFG3D87RobofNu5xFbbyyIllhoenf3IkorlvektyKw7FobakebuatyAczWnMzmWjimogu87P4NOYxGDO3F5VHVZG9ZGLXK74GWRTOVY%2Fa4z%2FRGRRV6KNRDY6Rz5SBN%2B1AqX0BZLAM0BZLAM8BZLZLZZZBZZZZZZZZZZZZZZZZLQXJA3D%
  • /4.目前,我国的城市规模7 7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市4个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市7个城市2F3n9w8FMfpU%2)2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 LBPUEMJ9BJZ5DPIVMIJI47LSRO6QFOPElp6zXNzt0j6TVks6P%2FBw%3D%3D&SigAlg=http%3A%2F%2Fwww.w3.org%2F2000%2F09%2Fxmldsig%23rsa-sha1&Signature=RXOFG3D87RobofNu5xFBByyIllhoef3IkW7FobakeBuatyACZWnMzMjimogu87P4NOYXGDO3F5VHVZ9ZGLXK74GWRTOVWY%2Fa4z%2FRG6KnRmDyZZ5SBN%2BRG8QQ8CV0BIZLZB4ZB8B4ZZZB8B8B8B4ZZZZZZZB8K%
  • /SAML/AssertionConsumerService.aspx
堆叠轨迹

[SAMLException: The partner identity provider http:// sp.com/adfs/services/trust is not configured.]
  ComponentSpace.SAML2.Configuration.SAMLConfiguration.GetPartnerIdentityProvider(String name) in c:\Sandboxes\ComponentSpace\SAMLv20\Library\Configuration\SAMLConfiguration.cs:245
  ComponentSpace.SAML2.SAMLServiceProvider.ReceiveSSO(HttpRequest httpRequest, Boolean& isInResponseTo, String& partnerIdP, String& userName, SAMLAttribute[]& attributes, String& relayState) in c:\Sandboxes\ComponentSpace\SAMLv20\Library\SAMLServiceProvider.cs:664
  ComponentSpace.SAML2.SAMLServiceProvider.ReceiveSSO(HttpRequest httpRequest, Boolean& isInResponseTo, String& partnerIdP, String& userName, IDictionary`2& attributes, String& relayState) in c:\Sandboxes\ComponentSpace\SAMLv20\Library\SAMLServiceProvider.cs:637
  ExampleServiceProvider.SAML.AssertionConsumerService.Page_Load(Object sender, EventArgs e) in C:\Program Files (x86)\ComponentSpace SAML v2.0 for .NET\Examples\SSO\HighLevelAPI\WebForms\ExampleServiceProvider\SAML\AssertionConsumerService.aspx.cs:28
  System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
  System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
  System.Web.UI.Control.OnLoad(EventArgs e) +132
  System.Web.UI.Control.LoadRecursive() +66
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
ADFS配置为:

<PartnerIdentityProvider Name="https://sp.com/adfs/services/trust"
   SignAuthnRequest="true"
   WantSAMLResponseSigned="false"
   WantAssertionSigned="false"
   WantAssertionEncrypted="false"
   UseEmbeddedCertificate="true"
   SingleSignOnServiceUrl="http://sp.com/adfs/ls/"/ >

我通过更改身份验证的顺序解决了这个问题


现在它可以工作了。:-)

以下错误实际上是由ComponentSpace引发的:

合作伙伴身份提供程序是 未配置

这是因为您的
PartnerSP
中输入的
中的
名称
属性不匹配:

saml.config

<PartnerIdentityProvider Name="https://sp.com/adfs/services/trust" ... />
<appSettings>
    <add key="PartnerSP" value="http://sp.com/adfs/services/trust />
    ...
</appSettings>

Web.config

<PartnerIdentityProvider Name="https://sp.com/adfs/services/trust" ... />
<appSettings>
    <add key="PartnerSP" value="http://sp.com/adfs/services/trust />
    ...
</appSettings>