The message is not an HTTP POST Error

We are attempting to implement SSO for our company website and we are getting the following error when we recieve the response from our IdP:

The message is not an HTTP POST.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: ComponentSpace.SAML2.Exceptions.SAMLBindingException: The message is not an HTTP POST.
Source Error:

Line 130: // Redirect to the target URL.Line 131: //Response.Redirect(targetUrl, true);Line 132: }Line 133:Line 134: private void Authenticate(string userName)

Source File: c:\inetpub\wwwroot\KenticoCMSUAT\CMSWebParts_Custom\PCU\SamlLogon.ascx.cs Line: 132
Stack Trace:
[SAMLBindingException: The message is not an HTTP POST.] ComponentSpace.SAML2.Bindings.HTTPPostBinding.ReceiveResponse(HttpRequest httpRequest, XmlElement& samlMessage, String& relayState) in c:\Sandboxes\ComponentSpace\SAMLv20\Library\Bindings\HTTPPostBinding.cs:461 ComponentSpace.SAML2.InternalSAMLServiceProvider.ReceiveSSO(HttpRequest httpRequest, Boolean& isInResponseTo, String& partnerIdP, String& userName, SAMLAttribute[]& attributes, String& relayState) in c:\Sandboxes\ComponentSpace\SAMLv20\Library\InternalSAMLServiceProvider.cs:597 ComponentSpace.SAML2.SAMLServiceProvider.ReceiveSSO(HttpRequest httpRequest, Boolean& isInResponseTo, String& partnerIdP, String& userName, IDictionary& attributes, String& relayState) in c:\Sandboxes\ComponentSpace\SAMLv20\Library\SAMLServiceProvider.cs:314 CMSWebParts_Custom_Saml_Logon.OnLoad(EventArgs e) in c:\inetpub\wwwroot\KenticoCMSUAT\CMSWebParts_Custom\PCU\SamlLogon.ascx.cs:132 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Control.LoadRecursive() +190 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Looking at Fiddler I can see that we are getting a POST response initially from our IdP but then our CMS responds with a 302 and redirects causing a GET request. I’m assuming this is why we are getting the error. I’m not sure if there is a way to allow our CMS to accept POSTS directly. Is there anything that can be done to allow us to accept the response from the GET?

Hopefully that all made sense.

Your assumption is correct. The SAML response is included as Post data in an HTTP Post request. The SAML specification and our component do not support sending/receiving a SAML response using an HTTP Get. You will need to somehow allow the HTTP Post through and not redirect.