We have a sso system when the user logs in the client system he will automatically logged in and redirected to a different site. The system works fine but we observed that the system throws a 404 error when the user tries to log in from IE 8 for the first
time. when the user click back button and tries login again it works fine.
After some more digging i noticed a difference between first http header which failed and the http header which passed. the http header which failed has an referrer attribute in the header like below
Accept-Encoding: gzip, deflate
Accept-Language: en-US
Accept: image/jpeg, image/gif, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, */*
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: ASP.NET_SessionId=ggmsxtwpgfhsaz2501132jz3
GET https://example.com/home?s=ZXVuPXN0YWZmdXNyMDE7ZXVwPXN0QGZmdXNSMDE7b2ZmaWNlaWQ9O29mZmljZT07Y3VzdD1PSzt0cz03MzUyNjIwMTQ3O3ZlbmRvcj0xO3N1bj1zZWVrZXIwN0BkZW1vLmNvbTs= HTTP/1.1
Host: example.com
Referer: https://deployment.client/mn_loginstatistics_dsp.cfm
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
In our sso service source calling the method Response.RedirectPermanent(accessUrl, true);
accessURL="https://example.com/home?s=ZXVuPXN0YWZmdXNyMDE7ZXVwPXN0QGZmdXNSMDE7b2ZmaWNlaWQ9O29mZmljZT07Y3VzdD1PSzt0cz03MzUyNjIwNjMzO3ZlbmRvcj0xO3N1bj1zZWVrZXIwN0BkZW1vLmNvbTs=";
But in the response the url written is wrong
HTTP/1.1302FoundCache-Control:privateContent-Type: text/html; charset=utf-8Location:/home?s=ZXVuPXN0YWZmdXNyMDE7ZXVwPXN0QGZmdXNSMDE7b2ZmaWNlaWQ9O29mZmljZT07Y3VzdD1PSzt0cz03MzUyNjIwNDIwO3ZlbmRvcj0xO3N1bj1zZWVrZXIwN0BkZW1vLmNvbTs=Server:Microsoft-IIS/7.5
X-AspNet-Version:4.0.30319
X-Powered-By: ASP.NETDate:Mon,27Jan201409:20:36 GMTContent-Length:261<html><head><title>Object moved</title></head><body><h2>Object moved to <a href="/home?s=ZXVuPXN0YWZmdXNyMDE7ZXVwPXN0QGZmdXNSMDE7b2ZmaWNlaWQ9O29mZmljZT07Y3VzdD1PSzt0cz03MzUyNjIwNDIwO3ZlbmRvcj0xO3N1bj1zZWVrZXIwN0BkZW1vLmNvbTs=">here</a>.</h2></body></html>
In URL rewriting in web.config we have module to rewrite to https, Im not sure whether this has any issues. Can some one tell where the issue could be and how to resolve it?
<rewrite><rules><rulename="Redirect to HTTPS"stopProcessing="true"><matchurl="(.*)"/><conditions><addinput="{HTTPS}"pattern="^OFF$"/></conditions><actiontype="Redirect"url="https://{HTTP_HOST}{REQUEST_URI}"redirectType="SeeOther"/></rule></rules></rewrite>