Error in ACS

Hi, I get this NullReferenceException when my AssertionConsumerService page is called. Can somebody tell me where I’ve gone wrong? Thanks.


Could you please paste the stack trace as text rather than an image? Unfortunately the line numbers were cut off the right hand side of the image.
Do you have sessions disabled in your application? ie

We use the session state to store certain state information associated with the SAML protocol. I’m surprised you got a NullReferenceException though as we throw a specific error indicating there is no session if this is the case. The full stack trace with line numbers will help identify if this is the issue.
Thanks.

You’re right, it was the sessionState (actually, I implemented the code as an ASHX handler but didn’t implement IRequiresSessionState).

Here’s the full stack trace if you’re still curious:

[NullReferenceException: Object reference not set to an instance of an object.] ComponentSpace.SAML2.Data.ServiceProviderSession.get_Current() in c:\Sandboxes\ComponentSpace\SAMLv20\Library\Data\ServiceProviderSession.cs:21 ComponentSpace.SAML2.SAMLServiceProvider.ReceiveSSO(HttpRequest httpRequest, Boolean& isInResponseTo, String& partnerIdP, String& userName, SAMLAttribute[]& attributes, String& relayState) in c:\Sandboxes\ComponentSpace\SAMLv20\Library\SAMLServiceProvider.cs:670 ComponentSpace.SAML2.SAMLServiceProvider.ReceiveSSO(HttpRequest httpRequest, Boolean& isInResponseTo, String& partnerIdP, String& userName, IDictionary& attributes, String& relayState) in c:\Sandboxes\ComponentSpace\SAMLv20\Library\SAMLServiceProvider.cs:636 AssertionConsumerService.ProcessRequest(HttpContext context) in d:\Inetpub\WWWroot\disasternew\SAML\AssertionConsumerService.ashx:25 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Thanks for your help!

Thanks for the stack trace and additional information.
I’m still surprised you got a NullReferenceException as a little while back we added explicit checks and throw a more friendly exception.
What version of the SAML DLL are you using?
http://www.componentspace.com/Forums/31/Determining-the-Component-Version-and-License

The 2.0 version.

More specifically, version 2.5.0.6.

Thanks. The current version is 2.5.0.14. We’ve since added better reporting of this error since 2.5.0.6.