I created a simple web application from visual studio Web Application(Net.Core)
template with individual user account authorization.
Then, I enabled SSL in Project->MyProject Properties...
, copied URL with https to App Url.
Finally, I added:
services.AddMvc(options =>
{
options.Filters.Add(new RequireHttpsAttribute());
});
to Startup
.
And it doesn't work! When I'm starting the application, it just simply turns off after a second, and nothing happens, no error, nothing!
What's wrong with SSL in Asp.Net Core, and how can I enable it correctly?
For development testing you need to enable SSL first.
Right click the project > Properties > Debug
If your debugging stops after starting (no process ID found), then you have to install the IIS Express self-signed certificate into the certificate store.
You can follow this guide here. It's bit older but still applies to Visual Studio 2015. It's due to a bug in Update 3 where IIS Certificate isn't installed in the trusted certificate storage correctly.
Alternatively,
Now you should be able to debug it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With