Reputation: 9131
How will you disable SSL if you already set it up when you create your project to not use it on the first place? If I will try to create a new ASP.NET API 3.1 project without SSL, it will work fine when you first run it.
But on my case, I want to run it using
Project
setting under Debug -> Launch option:
Under this option, the typical option you usually see like check or uncheck SSL is missing so I am not able to disable it. So when you run this API template, you will prompt by the usual "Trust SSL Certificate" dialog box.
On the first place, I already disable SSL when I create my project, that's why it is strange to see this dialog box.
But when I changed the settings back to
IIS Express
under Debug -> Launch option, it was already been disabled, and when I run it, it runs fine without any issue about SSL notification. Is this an issue on Project
option only?
Upvotes: 8
Views: 14563
Reputation: 21
In Startup.cs
try removing
//app.UseHttpsRedirection();
And in launchsettings.json
:
"useSSL": false
Upvotes: 2
Reputation: 1577
To disable the dialog box, if your project launch set to 'project' and you don't want to see that dialog box, you just need to enter your application URL in the button input box with HTTP protocol.
the default app URL is Https://loclahost:5001 or Https://localhost:5000 that you can be changed to any other URL such as http://localhost:27510
Upvotes: 2