小编Jho*_*les的帖子

此站点无法从 dotnet linux 提供安全连接 asp.net core

我目前正在使用 asp.net core 2.1 开发 API。当我在 Windows 中使用 ide Visual Studio 2019 时,我在运行项目时没有遇到问题,但是现在我使用的是 manjaro linux 并且我使用 dotnet 控制台进行编译时出现错误: 此站点无法提供安全连接 err_ssl_protocol_error

在此处输入图片说明

我见过的大多数解决方案都是使用框架 asp.net 或更改 Visual Studio IDE 的选项制作的,因此我无法在我的项目中实现它。我试过添加:

.UseSetting("https_port", "5000")
Run Code Online (Sandbox Code Playgroud)

在 program.cs 里面,但它没有用

类程序.cs

public static void Main(string[] args)
{
    var host = CreateWebHostBuilder(args).Build();
    RunSeeding(host);//esta llamando el alimentador de la base de datos
    host.Run();
}

private static void RunSeeding(IWebHost host)
{
    var scopeFactory = host.Services.GetService<IServiceScopeFactory>();
    using (var scope = scopeFactory.CreateScope())
    {
        var seeder = scope.ServiceProvider.GetService<SeedDb>();
        seeder.SeedAsync().Wait();
    }
}

public static IWebHostBuilder …
Run Code Online (Sandbox Code Playgroud)

c# linux asp.net-core

5
推荐指数
1
解决办法
7162
查看次数

标签 统计

asp.net-core ×1

c# ×1

linux ×1