Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net core InvalidSaml2BindingException:不是HTTP GET方法_Asp.net Core_Itfoxtec Identity Saml2 - Fatal编程技术网

Asp.net core InvalidSaml2BindingException:不是HTTP GET方法

Asp.net core InvalidSaml2BindingException:不是HTTP GET方法,asp.net-core,itfoxtec-identity-saml2,Asp.net Core,Itfoxtec Identity Saml2,我正在使用4.0.7与和来自 当我从VisualStudio运行此示例时,我没有收到任何错误,并且一切正常。但是,当我将这些示例部署到Windows server 2019上的IIS 10时,在测试SecurePage时出现错误,请参见下面的错误 它看起来像是ITfoxtec.Identity.Saml2.Saml2RedirectBinding.Read方法在示例程序中接收一个POST请求,而不是GET 你能帮我解决这个例外吗 处理请求时发生未处理的异常 InvalidSaml2Binding

我正在使用4.0.7与和来自

当我从VisualStudio运行此示例时,我没有收到任何错误,并且一切正常。但是,当我将这些示例部署到Windows server 2019上的IIS 10时,在测试
SecurePage
时出现错误,请参见下面的错误

它看起来像是
ITfoxtec.Identity.Saml2.Saml2RedirectBinding.Read
方法在示例程序中接收一个POST请求,而不是GET

你能帮我解决这个例外吗

处理请求时发生未处理的异常

InvalidSaml2BindingException:不是HTTP GET方法。 Saml2RedirectBinding.cs第151行中的ITfoxtec.Identity.Saml2.Saml2RedirectBinding.Read(HttpRequest请求,Saml2Request saml2RequestResponse,string messageName,bool validateXmlSignature)

堆栈查询Cookies头路由

InvalidSaml2BindingException:不是HTTP GET方法。 Saml2RedirectBinding.cs中的ITfoxtec.Identity.Saml2.Saml2RedirectBinding.Read(HttpRequest请求、Saml2Request saml2RequestResponse、string messageName、bool validateXmlSignature)

抛出新的InvalidSaml2BindingException(“非HTTP获取方法”); Saml2Binding.cs中的ITfoxtec.Identity.Saml2.Saml2Binding.ReadSamlRequest(HttpRequest请求,Saml2Request Saml2Request) { AuthController.cs中的testidCore.Controllers.AuthController.ReadRelyingPartyFromLoginRequest(Saml2Binding绑定) 返回binding.ReadSamlRequest(Request.ToGenericHttpRequest(),new Saml2AuthnRequest(config))?.Issuer; AuthController.cs中的testidcore.Controllers.AuthController.Login() var relyingParty=ValidateRelyingParty(ReadRelyingPartyFromLoginRequest(requestBinding)); lambda_方法(闭包、对象、对象[]) Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(对象目标,对象[]参数) Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor+SyncActionResultExecutor.Execute(IActionResultTypeMapper映射器、ObjectMethodExecutor执行器、对象控制器、对象[]参数) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref状态Next、ref范围、ref对象状态、ref bool已完成) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed上下文) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref状态Next、ref范围、ref对象状态、ref bool已完成) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g_|24_0(ResourceInvoker invoker,Task lastTask,State next,Scope Scope,object State,bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed上下文) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref状态Next、ref作用域、ref对象状态、ref bool已完成) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g|u Logged|17|u 1(ResourceInvoker invoker) Microsoft.AspNetCore.Routing.EndpointMiddleware.g_uwaitRequestTask | 6_0(端点端点、任务请求任务、ILogger记录器) Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext上下文) Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext上下文) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext上下文)

问候
Ed

恐怕我以前没有看到过这个错误。SAML 2.0 Authn请求似乎是作为POST而不是GET发送的。
handels SAML 2.0 Authn请求的示例默认使用Saml2RedirectBinding。您案例中的TestWebAppCore.AuthController登录方法是否使用Saml2RedirectBinding?

恐怕我以前没有看到过此错误。看起来SAML 2.0 Authn请求是以POST而不是GET的形式发送的。 默认情况下,handels SAML 2.0 Authn请求的示例使用Saml2RedirectBinding。您案例中的TestWebAppCore.AuthController登录方法是否使用Saml2RedirectBinding