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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠