我正在研发SAML 2.0。尝试请求将工件解析为idp时,我收到以下错误。
无法通过soap发送请求接收响应:' meta'开始标记 在第5行第6位与“头部”的结束标记不匹配。第12行, 位置3。
以下是请求将工件解析为idp的代码:
Saml2ArtifactType0004 httpArtifact = Saml2ArtifactType0004.CreateFromHttpArtifactHttpForm(context.Request);
// Saml2ArtifactType0004 httpArtifact = Saml2ArtifactType0004.CreateFromHttpArtifactQueryString(System.Web.HttpContext.Current.Request);
// Create an artifact resolve request.
ArtifactResolve artifactResolve = new ArtifactResolve();
artifactResolve.Issuer = new Issuer(Util.GetAbsoluteUrl(System.Web.HttpContext.Current, "~/"));
artifactResolve.Artifact = new Artifact(httpArtifact.ToString());
// Send the artifact resolve request and receive the artifact response.
string spArtifactResponderUrl = WebConfigurationManager.AppSettings["ArtifactIdProviderUrl"];
ArtifactResponse artifactResponse = ArtifactResponse.SendSamlMessageReceiveAftifactResponse(spArtifactResponderUrl, artifactResolve);
// Extract the authentication request from the artifact response.
samlResponse = new Response(artifactResponse.Message);
relayState = httpArtifact.RelayState;
工件解析xml如下:
<saml:ArtifactResolve ID="_37DBE1945FEE46AFA8760669A9E35A71" Version="2.0" IssueInstant="2016-06-07T05:53:15.756Z" xmlns:saml="urn:oasis:names:tc:SAML:2.0:protocol"><saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">http://localhost:1426/</saml:Issuer><samlp:Artifact xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">AAQAAErbp/tMatqZ/zZ4dvK10H8AAAAAvYu+k6ffUkCCUnLjx2ixkwAAAAA=</samlp:Artifact></saml:ArtifactResolve>
任何人都可以帮我解决错误吗?