Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net core dependency Kestrel.Https 1.0.0-rc1-final不支持框架DNXCore,版本=v5.0_Asp.net Core_Kestrel Http Server - Fatal编程技术网

Asp.net core dependency Kestrel.Https 1.0.0-rc1-final不支持框架DNXCore,版本=v5.0

Asp.net core dependency Kestrel.Https 1.0.0-rc1-final不支持框架DNXCore,版本=v5.0,asp.net-core,kestrel-http-server,Asp.net Core,Kestrel Http Server,我正在尝试将https配置到我的Kestrel服务器,以便在Ubuntu14上使用dnxcore50 但当我将依赖项添加到: “Microsoft.AspNet.Server.Kestrel.Https:“1.0.0-rc1-final” 我尝试恢复我的软件包,但收到以下消息: Dependency Kestrel.Https 1.0.0-rc1-final不支持框架DNXCore,版本=v5.0 如果我转到windows并使用dnx451并添加相同的依赖项,那么效果会很好 但是,如果我不能在U

我正在尝试将https配置到我的Kestrel服务器,以便在Ubuntu14上使用dnxcore50

但当我将依赖项添加到:

“Microsoft.AspNet.Server.Kestrel.Https:“1.0.0-rc1-final”

我尝试恢复我的软件包,但收到以下消息:

Dependency Kestrel.Https 1.0.0-rc1-final不支持框架DNXCore,版本=v5.0

如果我转到windows并使用dnx451并添加相同的依赖项,那么效果会很好


但是,如果我不能在Ubuntu上使用Kestrel.Httpsdnxcore50,我如何在Ubuntu上使用dnxcore50配置Https?

这是因为Kestrel的Https版本只针对RC1上的完整.NET框架:

从RC2开始,Kestrel.Https将以netstandard1.3为目标


因此,解决方案是要么等待RC2删除,要么使用MyGet中溢出的RC2位。

这是因为Kestrel的HTTPS版本只针对RC1上的完整.NET framework:

从RC2开始,Kestrel.Https将以netstandard1.3为目标


因此,解决方案是要么等待RC2下降,要么使用MyGet流出的RC2位。

如今Kestrel已经支持HTTPS:

以下是自版本1.0.0以来支持它的库:

要在代码上实现它,请在主菜单中初始化asp.net核心应用程序,并添加
UseHttps
作为选项

这是一个如何做的示例

    public static void Main(string[] args)
    {
        var host = new WebHostBuilder()
            .UseKestrel(options =>
            {
                // options.ThreadCount = 4;
                options.NoDelay = true;
                options.UseHttps("testCert.pfx", "testPassword");
                options.UseConnectionLogging();
            })
            .UseUrls("http://localhost:5000", "https://localhost:5001")
            .UseContentRoot(Directory.GetCurrentDirectory())
            .UseStartup<Startup>()
            .Build();

        // The following section should be used to demo sockets
        //var addresses = application.GetAddresses();
        //addresses.Clear();
        //addresses.Add("http://unix:/tmp/kestrel-test.sock");

        host.Run();
    }
publicstaticvoidmain(字符串[]args)
{
var host=new WebHostBuilder()
.UseKestrel(选项=>
{
//options.ThreadCount=4;
options.NoDelay=true;
使用https(“testCert.pfx”、“testPassword”);
options.UseConnectionLogging();
})
.useURL(“http://localhost:5000", "https://localhost:5001")
.UseContentRoot(目录.GetCurrentDirectory())
.UseStartup()
.Build();
//应使用以下部分演示套接字
//var addresses=application.GetAddresses();
//地址。清除();
//地址。添加(“http://unix:/tmp/kestrel-"测试袜",;
host.Run();
}
下面还有一个来自示例的链接


如今红隼已经支持HTTPS:

以下是自版本1.0.0以来支持它的库:

要在代码上实现它,请在主菜单中初始化asp.net核心应用程序,并添加
UseHttps
作为选项

这是一个如何做的示例

    public static void Main(string[] args)
    {
        var host = new WebHostBuilder()
            .UseKestrel(options =>
            {
                // options.ThreadCount = 4;
                options.NoDelay = true;
                options.UseHttps("testCert.pfx", "testPassword");
                options.UseConnectionLogging();
            })
            .UseUrls("http://localhost:5000", "https://localhost:5001")
            .UseContentRoot(Directory.GetCurrentDirectory())
            .UseStartup<Startup>()
            .Build();

        // The following section should be used to demo sockets
        //var addresses = application.GetAddresses();
        //addresses.Clear();
        //addresses.Add("http://unix:/tmp/kestrel-test.sock");

        host.Run();
    }
publicstaticvoidmain(字符串[]args)
{
var host=new WebHostBuilder()
.UseKestrel(选项=>
{
//options.ThreadCount=4;
options.NoDelay=true;
使用https(“testCert.pfx”、“testPassword”);
options.UseConnectionLogging();
})
.useURL(“http://localhost:5000", "https://localhost:5001")
.UseContentRoot(目录.GetCurrentDirectory())
.UseStartup()
.Build();
//应使用以下部分演示套接字
//var addresses=application.GetAddresses();
//地址。清除();
//地址。添加(“http://unix:/tmp/kestrel-"测试袜",;
host.Run();
}
下面还有一个来自示例的链接


我们欢迎您提供一个指向潜在解决方案的链接,但请务必这样做,以便您的其他用户了解它是什么,以及它为什么会出现。始终引用重要链接中最相关的部分,以防无法访问目标站点或永久脱机。考虑到仅仅是一个指向外部站点的链接是一个可能的原因。sad@FelixSFDI刚刚添加了代码来改进答案,现在更好理解了吗?一个指向潜在解决方案的链接总是受欢迎的,但是请让您的其他用户知道它是什么以及它为什么存在。始终引用重要链接中最相关的部分,以防无法访问目标站点或永久脱机。考虑到仅仅是一个外部站点的链接是一个可能的原因。那么sad@FelixSFDI刚刚添加了代码来改进答案,现在更好理解了吗?