Quantcast
Channel: Claims based access platform (CBA), code-named Geneva forum
Viewing all articles
Browse latest Browse all 2535

[RESOLVED] .NET 4.5.1 - Custom STS Implementation: Exception: "A SamlAssertion requires at least one statement. Ensure that you have added at least one SamlStatement to the SamlAssertion you are creating.""

$
0
0

Hello,

I am using .NET Framework 4.5.1 (so no WIF here) to create a custom STS implementation. This is based loosely on the code from this project:

http://code.msdn.microsoft.com/vstudio/Federation-Metadata-34036040/file/54332/10/Federation%20Metadata.zip

My version of the STS perform standalone authentication using claims pre-stored in a SQL database (this data is a mix of Windows Auth and OAuth information). For now, I havent plugged it into this SQL database, but proceeding with dummy claims until I can get this up and working.

When I use the "Issue" endpoint to generate the STS tokens, I get this exception:

------------------ EXCEPTION ---------------------------------

Server Error in '/' Application.

A SamlAssertion requires at least one statement.  Ensure that you have added at least one SamlStatement to the SamlAssertion you are creating.

             Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.            

Exception Details: System.ArgumentException: A SamlAssertion requires at least one statement.  Ensure that you have added at least one SamlStatement to the SamlAssertion you are creating.

Source Error:
Line 114:
Line 115:			SignInRequestMessage requestMessage = (SignInRequestMessage)WSFederationMessage.CreateFromUri(new Uri(fullRequest));Line 116:			SignInResponseMessage responseMessage = FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest(requestMessage, principal, _serviceInstance);Line 117:			responseMessage.Write(writer);
Line 118:

------------------------------------------------------------------

Any pointers?

Regards,

Sujay


----------------------- Sujay Sarma {Unbounded;}



Viewing all articles
Browse latest Browse all 2535


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>