2017-05-13 11 views
2

私は.NET Core 1.1 Web APIを使用しています。 AzureのAppServiceにデプロイすると、GETリクエストには応答しません。すべてのタイムアウトになります。私は現在の日付と時間を単に返すオープンpingエンドポイントを持っており、応答していません。ログを見ると、私はこれを見ています:.NET Core Web Apiエラー-4090 AzureでEADDRNOTAVAILアドレスが利用できません

[INF] Azure Web Sites environment detected. Using '"D:\home\ASP.NET\DataProtection-Keys"' as key repository; keys will not be encrypted at rest. (383ad3af) 
[WRN] Unable to bind to http://localhost:22676 on the IPv6 loopback interface. (de7f78a0) 
System.AggregateException: One or more errors occurred. (Error -4090 EADDRNOTAVAIL address not available) ---> Microsoft.AspNetCore.Server.Kestrel.Internal.Networking.UvException: Error -4090 EADDRNOTAVAIL address not available 
    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 -4090 EADDRNOTAVAIL address not available 
    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)<--- 

私はこれがなぜ起こっているのか、それを解決する方法がわかりません。

EDIT:ここではこれは私のファイアウォールの問題であることをなっProgram.csの

public static void Main(string[] args) 
    { 
     var configuration = new ConfigurationBuilder() 
      .AddEnvironmentVariables() 
      .AddCommandLine(args) 
      .Build(); 

     var host = new WebHostBuilder() 
      .ConfigureLogging(options => options.AddConsole()) 
      .ConfigureLogging(options => options.AddDebug()) 
      .UseConfiguration(configuration) 
      .UseIISIntegration() 
      .UseKestrel(options => 
      { 
       options.ThreadCount = 1; 
      }) 
      .UseStartup<Startup>() 
      .Build(); 

     host.Run(); 
    } 
+0

ホスト(デフォルトではProgram.csファイルの「Main」メソッド)をどのように設定するかを示します。そこに '.UseAzureAppServices()'を追加しましたか? – Set

+0

Program.csが追加されました。私はUseAzureAppServices()を使用しませんでした。それは必要ですか? – Mensur

+0

私は依存関係を追加し、UseAzureAppServices()の呼び出しを含めましたが、違いはありませんでした。 – Mensur

答えて

1

です。ログ内のメッセージは単なる警告であり、通常の処理を妨げるようには見えません。

0

ASP.NET Core 2.0でも同じ問題がありました。

public static IWebHost BuildWebHost(string[] args) 
{ 
    return WebHost 
       .CreateDefaultBuilder(args) 
       .UseUrls("http://+:22676") // <--add urls 
       .UseStartup<Startup>() 
       .Build(); 
} 
関連する問題