Asp.net Redirecting from Https to Http

前端 未结 5 463
长情又很酷
长情又很酷 2020-12-21 15:45

I am trying to redirect from secure (https) to http when user login. It redirects fine but for some reason its keeping the https.

 Response.Redirect(Redirect         


        
5条回答
  •  执笔经年
    2020-12-21 16:11

    Can I suggest that you take a look at the requests with a tool such as Fiddler, to see where these redirects are coming from, and indeed to confirm that RedirectPath is indeed fully qualified?

    You should be able to confirm that the credentials are being sent over HTTPS, and that you are then redirected (using a 302) to HTTP. If you're redirected to HTTPS, then it's likely that you're not setting the fully qualified domain.

    The other alternative is that you are indeed redirecting to an HTTP page, but there's something else that's then forcing the user back to HTTPS - for example the mechanism that forced the user to HTTPS for the login - is this a per page or per directory setting? In which case you'd see a 302 to HTTP, followed by another 302 to HTTPS.

提交回复
热议问题