Bir istemci Web Api'ye çağrıları kullandığımda bir hata meydana geliyor. Sorun, geri döneceğim yığın izinin biraz okunamaması, satır numaralarının olmaması, böylece nereye bakacağımı bilmiyorum. Bu bir Json cevabı olarak iade ediliyor.Asp.Net Web Api'den Uygun Yığın İzleme Async/Görev çağrıları
"message": "An error has occurred.",
"exceptionMessage": "Object reference not set to an instance of an object.",
"exceptionType": "System.NullReferenceException",
"stackTrace": " at WakeSocial.Gateway.WebApi.Host.Controllers.NotificationsController.<Response>d__7.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
}
hata yüzden daha uygun sorunu ayıklamaya olabilir oluştu hat sayısını döndürmek için web API konfigürasyon dosyasında ki bir yolu var mı?
mesele burada kaplıydı: Stack traces with async/await
Şu anda .Net 4.5 usng ediyorum henüz hatalar hala bu şekilde outputted olsun.
API'ı hata ayıklayabilir misiniz? Yapabilirseniz kolayca bir "NullReferenceException" arayabilirsiniz. –
@JoelDean: WakeSocial.Gateway.WebApi.Host.Controllers.NotificationsController. d__7.MoveNext() ',' NotificationsController.Response 'eyleminde olduğu anlamına gelir. Eylem, izlemek için bir satır numarasına ihtiyacınız olacak kadar uzun ve karmaşık mı? –