在修复此处描述的问题时,我创建了另一个我可以在网络上的其他任何地方找到的内容:
SignInResponseMessage message = WSFederationMessage.CreateFromFormPost(context.Request) as SignInResponseMessage;
Run Code Online (Sandbox Code Playgroud)
上面的代码不断调用IsValidRequestString(),这会导致无限循环.每次调用都是相同的,堆栈如下所示:
> TestIdentityBroker.dll!TestIdentityBroker.Service.WsFederationRequestValidator.IsValidRequestString(System.Web.HttpContext context, string value, System.Web.Util.RequestValidationSource requestValidationSource, string collectionKey, out int validationFailureIndex) Line 19 C#
[External Code]
TestIdentityBroker.dll!TestIdentityBroker.Service.WsFederationRequestValidator.IsValidRequestString(System.Web.HttpContext context, string value, System.Web.Util.RequestValidationSource requestValidationSource, string collectionKey, out int validationFailureIndex) Line 19 + 0x21 bytes C#
[External Code]
TestIdentityBroker.dll!TestIdentityBroker.Service.WsFederationRequestValidator.IsValidRequestString(System.Web.HttpContext context, string value, System.Web.Util.RequestValidationSource requestValidationSource, string collectionKey, out int validationFailureIndex) Line 19 + 0x21 bytes C#
[External Code]
TestIdentityBroker.dll!TestIdentityBroker.Service.WsFederationRequestValidator.IsValidRequestString(System.Web.HttpContext context, string value, System.Web.Util.RequestValidationSource requestValidationSource, string collectionKey, out int validationFailureIndex) Line 19 + 0x21 …Run Code Online (Sandbox Code Playgroud) asp.net-mvc identity wif sts-securitytokenservice asp.net-mvc-3
我看到FedMetadata文档可以提供注销通知和订阅端点,web.config定义了登录请求的发布者URL,但我无法找到WIF知道发送注销请求的位置.如果我使用的STS为登录和签出请求定义了不同的端点,我如何在代码中访问它或在web.config中设置它?