Subject: how can we read the post request in WEB API2 in c# Date: 2018-01-10 10:46:32 From: ppudhota@affinitiv.com Source: can-read-post-request-web-api2-c ---------------------------------------------------------------------- i am acting as consumer side(Service provider), when i receive the request from IDP, i read the request using WEB API2 and convert into SAML Response. but i unable to do that i am trying to read the saml response in web api, it gives me error and in WEB API i got the httprequestmessage not httprequestbase(null), Please help me to read the post request below Sample Code public IHttpActionResult SSO(HttpRequestMessage request) { //var content = request.Content; //var x = content.ReadAsStringAsync().Result; // try // { // #region Receive SAML Response // // Create a SAML response from the HTTP request. ComponentPro.Saml2.Response samlResponse = ComponentPro.Saml2.Response.Create(request); --- gives the error } ---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index