应用洞察引发无休止的异常

时间:2016-07-18 08:03:49

标签: asp.net-core asp.net-core-mvc asp.net-core-1.0 azure-application-insights

当启用Application Insights请求遥测中间件时,它会抛出所有类型的异常而不会结束。这不是以前的问题。

Startup.ConfigureServices配置:

var appInsightsConfiguration = new ConfigurationBuilder()
    .AddApplicationInsightsSettings(
        developerMode: true,
        instrumentationKey: Configuration["ApplicationInsights:Key"])
    .Build();

services.AddApplicationInsightsTelemetry(appInsightsConfiguration);

将中间件添加到管道的开头:

app.UseApplicationInsightsRequestTelemetry();

我们使用的是Microsoft.ApplicationInsights.AspNetCore的1.0.0。

抛出的异常看起来像这样:

  

{System.Net.WebException:远程服务器返回错误:(400)   错误的请求。在   System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)}

enter image description here

enter image description here

{System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.BeginReceive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state)
   at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)}

enter image description here

0 个答案:

没有答案