X-Ray causes my app to throw a NullReferenceException from ASP.NET MVC code

0

In my ASP.NET MVC running on EC2, I get the following exception when accessing my webapp:

[NullReferenceException]: Object reference not set to an instance of an object.
   at System.Web.HttpApplication.GetNotifcationContextProperties(Boolean& isReentry, Int32& eventCount)
   at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
   at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
   at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)

As you can see, the error is in the .NET framework, not thrown directly from my Global.asax.cs.
Here is my Global.asax.cs:

public class MvcApplication : System.Web.HttpApplication
	{
		protected void Application_Start()
		{
                        ...
                       AWSXRayASPNET.RegisterXRay(this, "authorize-qa");
                 }
        }

I've confirmed the X-Ray Windows Service is running on my instance.

Edited by: LuisLDQ on Oct 21, 2019 10:43 AM

Added line about X-Ray Windows Service

LuisLDQ
已提問 5 年前檢視次數 221 次
1 個回答
0

My problem was I wasn't putting the call to the SDK in the Init method.

LuisLDQ
已回答 5 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南