我正在尝试将 SSL 集成到我的 asp.net 核心项目我下载 sslforfree 文件以进行手动验证。我将验证文件上传到我的服务器
尽管路径中的服务器中有文件,但在浏览器中浏览我的网站时会出现该错误
找不到此页面 没有找到该网址的网页:
这是链接。
我的 .net 核心网站工作。只是它不显示验证文件
这是我的服务器路径文件
在 IIS 服务器中,我将 mime 类型 .(comma) 作为文本/纯文本,但它仍然给出错误。我该怎么办?这适用于具有 4.0 应用程序池的 .net mvc 项目,但在 asp.net 核心应用程序中找不到页面错误水池
这是我的startup.cs
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddSession();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseBrowserLink();
}
else
{
app.UseExceptionHandler("/Home/Error");
}
app.UseStaticFiles();
app.UseSession();
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default2",
template: "{controller=Admin}/{action=BookFastSearch}/{id?}");
});
}
}