Raw markup displayed in Chrome instead of SSO redirect - IdentityProvider.SendSAMLResponseByHTTPPost

We are using ComponentSpace.SAML2.Profiles.SSOBrowser.IdentityProvider and calling SendSAMLResponseByHTTPPost to perform SSO and redirect a user to another URL.This is working fine on IE and Firefox, but on Chrome the following is displayed in the browser

<html xmlns=“ “>http://www.w3.org/1999/xhtml”> <body onload=“document.forms.samlform.submit()”>

Note: Since your browser does not support Javascript, you must press the Continue button once to proceed.

<form id=“samlform” action=”https://REDACTED URL" method=“post”>
<input type=“hidden” name=“RelayState” value=“https://REDACTED URL”/>


T
his is working on Chrome in a local environment with the same code.There are some SSL certificate issues on the environment where we are experiencing the problem. Not sure if this could be related - is Chrome is more strict about this than other browsers?

I have also posted this on StackOverflow
http://stackoverflow.com/questions/30315516/raw-markup-displayed-in-chrome-instead-of-sso-redirect-identityprovider-sendsa


x-content-type-options: nosniff was preventing Chrome from inferring the MIME type from the content.
Explicitly specifying Content-Type: text/html resolved the issue.

Thanks for the information. We haven’t seen that with Chrome or any other browser.
Tracing the HTTP traffic I see that the following header is included:
Content-Type: text/html; charset=utf-8
The full HTTP response is below.
I wonder if in your scenario an intermediate node has stripped this header?
I’ll reply in SO as well.


HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
Set-Cookie: ASP.NET_SessionId=abbqmeqptkyb50gddlxqvxb1; path=/; HttpOnly
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Tue, 19 May 2015 09:31:01 GMT
Content-Length: 8228

<body’><body"=“”><body"=“”><body">http://www.w3.org/1999/xhtml"><body onload=“document.forms.samlform.submit()”>

Note: Since your browser does not support Javascript, you must press the Continue button once to proceed.

<form id=“samlform” action=“http://localhost/ExampleServiceProvider/SAML/AssertionConsumerService.aspx” method=“post”>