14

So i was trying something and enabled SSL on my mvc5 project. Now i want to disable it, but whenever i run my project, the web site cannot be found (the url is different from the ssl one ofc). Any idea how to turn ssl back off ?

3
  • does the answer here help? stackoverflow.com/questions/18338368/… Commented Feb 3, 2015 at 15:16
  • no :S because i only have the filters.Add(new HandleErrorAttribute()); attribute on that method :S Commented Feb 3, 2015 at 15:18
  • create a filter attribute and do the opposite of this weblogs.asp.net/dwahlin/… Commented Feb 3, 2015 at 16:42

6 Answers 6

15

All of the above sound plausible, and none of them works for me! I have no strange filters, no RequireHttps decorations and no https ports. So my current only fix is to change the project property:

enter image description here

I can then happily debug and browse my test website. But if I exit Visual Studio and go back in, I have to reset the SSL enabled property again!

So this is only half an answer, but thought it might help someone ...

Sign up to request clarification or add additional context in comments.

2 Comments

I also had to use Google chrome instead of Firefox ...
May also have to change the project URL, as mentioned here.
14

I had this problem.

Project > Properties... > Web > Servers (IIS Express) > Project Url

Change:

https://localhost:20555

to http://localhost:20555

enter image description here

Comments

13

For me the solution was to remove

    [RequireHttps]

from the index method inside the home controller

3 Comments

Thanks, this answer led me to do a string search, which ultimately made me find this code that was actually causing my issue: filters.Add(new RequireHttpsUnlessLocalAttribute()); thanks for your answer!
Saved my time, thanks, I forgot to remove [RequireHttps] after disabling SSL
I had enabled SSL on my web project in VS 2017. Then changed the property back to false. It added the RequireHttps attribute to the home controller but did not remove it.
2

in .NET 5 application. Go to Project Properties-> Debug-> Disable "Enable SSL"

enter image description here

Comments

0

In addition to disabling "RequireHttps", you should also remove [RequireHttps] from your controllers.

Comments

0

Re-create the project without SSL required will be fastest in Visual Studio environment.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.