Problem encountered using Sample STS

After running sample.htm, and try to send the self issued authentication managed card to the server. the following error occurs.

Line 49: return GetResourceValue(claim);

Line 50: }

Line 51: throw new ArgumentException(String.Format("Claim {0} not found", uri));

Line 52: }

Line 53: }

[ArgumentException: Claim http://schemas.microsoft.com/ws/2005/05/identity/claims/givenname not found]

Microsoft.IdentityModel.TokenProcessor.ClaimTextCollection.get_Item(String uri) in c:\Ronghwa\MS CardSpace\Simple STS\website\CardSpace\App_Code\TokenProcessor.cs:51

ASP.login_aspx.Page_Load(Object sender, EventArgs e) in c:\Ronghwa\MS CardSpace\Simple STS\website\CardSpace\login.aspx:26

System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15

System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34

System.Web.UI.Control.OnLoad(EventArgs e) +99

System.Web.UI.Control.LoadRecursive() +47

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

Please help.

Ronghwa

[1380 byte] By [Ronghwa] at [2008-2-6]
# 1

You should comment following lines of code:

givenname.Text = token.Claims[ClaimTypes.GivenName];

surname.Text = token.Claims[ClaimTypes.Surname];

email.Text = token.Claims[ClaimTypes.Email];

because Simple STS doesn't provide that claims

Srdjan

srdjan.bozovic at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows CardSpace (InfoCard)...
# 2

... actually, its more like the login page of the RP never did ask for it

You can add the email, etc claims in the STS, if you want to.

I have documented the error here as well: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=653995&SiteID=1

Softwaremaker at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows CardSpace (InfoCard)...
# 3
Softwaremaker wrote:

... actually, its more like the login page of the RP never did ask for it

That's true, but I think that you can send information that is not asked for if your card has metadata for that aditional claims and you chose to send optional data. Anyway, have you tested some certificate authentication scenarious?

srdjan.bozovic at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows CardSpace (InfoCard)...

Software Development for Windows Vista

Site Classified