简体   繁体   English

在两个ASP.NET 3.5网站之间传递声明

[英]Pass Claims between two ASP.NET 3.5 web sites

I have two ASP.NET 3.5 web sites that I need to pass a claim from one site to the other site. 我有两个ASP.NET 3.5网站,需要将索赔从一个站点传递到另一个站点。

On one site I login and I can see the claim like the following: 在一个网站上,我登录后,可以看到如下的声明:

var claimIdentity = (Context.User.Identity as Microsoft.IdentityModel.Claims.IClaimsIdentity);
claimIdentity.Claims.Add(new Claim(ClaimTypes.Role, "Manager"));

But on the other site, I do not see the claim being passed. 但是在另一个站点上,我看不到该索赔获得通过。
I am using forms authentication between the sites and the machine key is the seom on both sites. 我在站点之间使用表单身份验证,并且机器密钥是两个站点上的seom。
Login / auth cookie is being passed fine between the sites but I just don't see the claim being passed. 登录/身份验证cookie在站点之间传递良好,但我只是看不到声明被传递。

I did open fiddler and can see the auth cookie being passed but I don't see anything that looks like a claim being passed in the header or body. 我确实打开了提琴手,可以看到通过了身份验证cookie,但看不到任何看起来像在标头或正文中传递了声明的内容。

You are using ADFS as your IDP? 您正在使用ADFS作为IDP?

The most probable cause is that the claims rules for the two RP (the two ASP.NET 3.5 web sites) are not the same. 最可能的原因是两个RP(两个ASP.NET 3.5网站)的声明规则不同。

You should have SSO OOTB between the sites so if you are using IE and it's setup for IWA, it should be seamless. 您应该在站点之间具有SSO OOTB,因此,如果您使用的是IE,并且它是为IWA设置的,则它应该是无缝的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM