How to change ap-mvc project protocol from https to http

SSRS-VS 46 Reputation points
2021-08-13T09:57:14.897+00:00

By default, the url of the views in a visual studio project are https. How can I change the whole urls of my project to http?

Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | ASP.NET | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-08-14T02:44:19.237+00:00

    Hi @SSRS-VS ,

    Based on your description and the tag, I assume your application is an Asp.net Core MVC application, right?

    If that is the case, to make the application using Http, instead of Https, you could use the following methods:

    1. You can opt-out of HTTPS/HSTS when the app is created from the template. Unchecked the "Configure for Https" option: 123205-image.png
    2. Open the launchSettings.json file and change the sslPort attribute to 0. 123196-image.png In the startup.cs file, remove the app.UseHttpsRedirection(); from the Configure method.
    3. Open the project's Properties page, in the Debug panel, unchecked the Enable SSL option. 123128-image.png By using this method, if you check the launchSettings.json file, you can see the sslPort attribute is changed to 0.

    More detail information, see Enforce HTTPS in ASP.NET Core.

    The above methods applys to Asp.net core Application, if you have any question about my reply, please let me know freely.


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Dillion

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.