<div>By Rick Anderson 's article
'Enforce HTTPS in an ASP.NET Core'
https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl</div> <div>
// Requires using Microsoft.AspNetCore.Mvc;
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.Configure<MvcOptions>(options =>
{
options.Filters.Add(new RequireHttpsAttribute());
});
}
My question is asp.net core razor pages use ssl can use The preceding highlighted code ?
I run my program in loacal host ,it is Ok;
But run the program in IIS it is "no page is found ",
I don't know why?