Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/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 “接收”;错误-4089 EAFNOSUPPORT地址系列不受支持;Azure上的.Net Core 1.1 Web应用中_Asp.net Core_Azure Web App Service_Asp.net Core Webapi_Asp.net Core 1.1 - Fatal编程技术网

Asp.net core “接收”;错误-4089 EAFNOSUPPORT地址系列不受支持;Azure上的.Net Core 1.1 Web应用中

Asp.net core “接收”;错误-4089 EAFNOSUPPORT地址系列不受支持;Azure上的.Net Core 1.1 Web应用中,asp.net-core,azure-web-app-service,asp.net-core-webapi,asp.net-core-1.1,Asp.net Core,Azure Web App Service,Asp.net Core Webapi,Asp.net Core 1.1,我将.Net Core 1.1中实现的Web Api作为应用程序服务发布到Azure,但即使在浏览静态html文件时,我仍不断收到以下错误消息: 2016-11-29 16:43:05.594 +00:00 [Warning] Unable to bind to http://localhost:28243 on the IPv6 loopback interface. System.AggregateException: One or more errors occurred. (Error

我将.Net Core 1.1中实现的Web Api作为应用程序服务发布到Azure,但即使在浏览静态html文件时,我仍不断收到以下错误消息:

2016-11-29 16:43:05.594 +00:00 [Warning] Unable to bind to http://localhost:28243 on the IPv6 loopback interface.
System.AggregateException: One or more errors occurred. (Error -4089 EAFNOSUPPORT address family not supported) ---> Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -4089 EAFNOSUPPORT address family not supported
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle handle, SockAddr& addr, Int32 flags)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvTcpHandle.Bind(ServerAddress address)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListener.CreateListenSocket()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.<StartAsync>b__8_0(Object state)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelEngine.CreateServer(ServerAddress address)
   at Microsoft.AspNetCore.Server.Kestrel.KestrelServer.Start[TContext](IHttpApplication`1 application)
---> (Inner Exception #0) Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -4089 EAFNOSUPPORT address family not supported
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle handle, SockAddr& addr, Int32 flags)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvTcpHandle.Bind(ServerAddress address)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListener.CreateListenSocket()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.<StartAsync>b__8_0(Object state)<---
2016-11-29 16:43:05.594+00:00[警告]无法绑定到http://localhost:28243 在IPv6环回接口上。
System.AggregateException:发生一个或多个错误。(错误-不支持4089 EAFNOSUPPORT地址系列)--->Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException:错误-不支持4089 EAFNOSUPPORT地址系列
位于Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle句柄、SockAddr&addr、Int32标志)
位于Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.uvtchandle.Bind(服务器地址)
在Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListener.CreateListenSocket()上
位于Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.b_uu8_0(对象状态)
---内部异常堆栈跟踪的结束---
位于System.Threading.Tasks.Task.ThrowifeException(布尔值IncludeTaskCanceledException)
在System.Threading.Tasks.Task.Wait(Int32毫秒计时,CancellationToken CancellationToken)
在System.Threading.Tasks.Task.Wait()中
位于Microsoft.AspNetCore.Server.Kestrel.Internal.kestrengine.CreateServer(服务器地址)
在Microsoft.AspNetCore.Server.Kestrel.KestrelServer.Start[TContext](IHttpApplication`1应用程序)上
--->(内部异常#0)Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException:错误-不支持4089 EAFNOSUPPORT地址系列
位于Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.Libuv.tcp_bind(UvTcpHandle句柄、SockAddr&addr、Int32标志)
位于Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.uvtchandle.Bind(服务器地址)
在Microsoft.AspNetCore.Server.Kestrel.Internal.Http.TcpListener.CreateListenSocket()上

在Microsoft.AspNetCore.Server.Kestrel.Internal.Http.Listener.b__8_0(对象状态)上,检查解决方案根目录中的
global.json
文件-是否有sdk版本“for 1.1”?差不多

{
  "projects": [ "src", "test" ],
  "sdk": {
    "version": "1.0.0-preview2-1-003177"
  }
}

检查解决方案根目录中的
global.json
文件-是否有sdk版本“for 1.1”?差不多

{
  "projects": [ "src", "test" ],
  "sdk": {
    "version": "1.0.0-preview2-1-003177"
  }
}

您的
程序.cs
或hosting.json中是否有类似
.UseUrls(“http://*:28243”)
的内容(如果您使用
.UseConfiguration(…)``加载自定义hosting.json并将其传递给
WebHostBuilder
)`?如果是,请尝试使用
.UseUrls(“)
?在一个RC版本中,出现了一个问题,
*:28343`会导致它两次绑定到IPv6@Tseng不,我根本没有这样的东西。那么,我应该继续添加.useURL(“0.0.0.0:28243”)吗假设这可以解决这个问题?我在DNX时代也遇到过类似的问题,这是由于主机名为
*
通配符。.你是在
useisintegration()
之前还是之后调用
useisintegration()
?顺序很重要,
.useisintegration()
需要在
usekstrel()之后调用
由于它覆盖了它的设置,我没有改变调用UserKerstel()的顺序。我一直使用与生成的Microsoft.net核心模板相同的代码。@Tseng I添加了.UseUrls(“0.0.0.0:28243”)我检查了日志文件,意识到Azure决定使用另一个Url,如。基本上,它不遵守我在代码中包含的Url。不确定是什么导致了这个问题!您是否有类似于
.UseUrls(“http://*:28243”)的内容
在您的
程序.cs
或您的hosting.json中(如果您使用
.UseConfiguration(…)``加载自定义hosting.json并将其传递给
WebHostBuilder
),如果是这样,请尝试使用
.UseUrls(“)
?在一个RC版本中,出现了一个问题,
*:28343`会导致它两次绑定到IPv6@Tseng不,我根本没有这样的东西。那么,我应该继续添加.useURL(“0.0.0.0:28243”)吗假设这可以解决这个问题?我在DNX时代也遇到过类似的问题,这是由于主机名为
*
通配符。.你是在
useisintegration()
之前还是之后调用
useisintegration()
?顺序很重要,
.useisintegration()
需要在
usekstrel()之后调用
由于它覆盖了它的设置,我没有改变调用UserKerstel()的顺序。我一直使用与生成的Microsoft.net核心模板相同的代码。@Tseng I添加了.UseUrls(“0.0.0.0:28243”)我检查了日志文件,意识到Azure决定使用另一个类似的Url。基本上它不遵守我在代码中包含的Url。不确定是什么导致了这个问题!