localhost working incorrectly - redirects to https

Jacob Mallach asked on February 1, 2018 16:59

Hello,

We're having some issues with the local build of our Kentico project. Specifically errors with our localhost.

Here are the steps to reproduce the problem.

  1. Launch/Debug the project via visual studios play button
  2. Visual studio runs through the build process successfully with NO errors.
  3. Upon finishing the build localhost is auto launched via Google Chrome
  4. Correct url and port number appear in Chrome url address bar i.e., localhost:51880
  5. Immediately after correct address begins to load the page is redirected to https://localhost
  6. Resulting in the following Chrome error: Site cannot be reached. localhost refused to connect.

Scenario: Some background. The build had been working previously, loading and displaying correctly via the localhost port number above. I am the only developer and have not made any changes related to localhost and/or redirects. The error happens accross all browsers.

My coworker had alerted me that he had changed the root folder files via 'http://mywebsite/admin/' to Require SSL.

I've reverted my coworkers change to NOT Require SSL then retested but the localhost error still persists. I feel the behavior is directly related to the SSL change as things were working swimmingly prior to this, yet disabling SSL has no affect.

Any thoughts on what could be going wrong?

Thanks for the help.

Jacob

Correct Answer

Brenden Kehren answered on February 1, 2018 17:08

Setup SSL in IIS. Bind port 443 to the development certificate and it should work just fine. You might get the security error but you can bypass that.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Peter Mogilnitski answered on February 1, 2018 17:10

Probably there is better way to debug is attaching to the process w3wp. The benefit of it is you can configure local IIS and local dns file (Windows\System32\drivers\etc\hosts) the way you want to simulate your production environment/actual domain. You can install SSL certificate on your local IIS etc.

0 votesVote for this answer Mark as a Correct answer

Markandey Pandey answered on May 24, 2018 14:48

Hi,

I am facing the same error and binding port 443 to the development certificate does not resolve the issue, is there any other workaround?

Regards, Markandey

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on May 24, 2018 14:52

Markandey Pandey did you try the suggested answer and create a binding to the local certificate?

0 votesVote for this answer Mark as a Correct answer

Markandey Pandey answered on May 24, 2018 15:17

Yes, have created a binding to the local certificate but the issue persists.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.