[英]Azure App service odd remote debugging error
Trying to debug an app service remotely and some of the methods are erroring out on a very weird point.尝试远程调试应用程序服务并且某些方法在一个非常奇怪的点上出错。 Specifically declaring and setting an int or string variable.
专门声明和设置一个 int 或 string 变量。 This is only happening on one of our team members machine's and no one else can reproduce it.
这仅发生在我们团队成员的一台机器上,其他人无法重现。
the line in question: int compId = 0;
有问题的行:
int compId = 0;
System.NullReferenceException: Object reference not set to an instance of an object.
at InfoSecToolkit.Controllers.UserController.isLDAPUserGranted(Int32 TypeId) in C:\Users\cesar.balangue_infos\source\repos\InfoSecToolkit-GIT\InfoSecToolkit\Controllers\UserController.cs:line 736
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__36(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass45.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3e()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass1e.<>c__DisplayClass28.<BeginInvokeAction>b__19()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass1e.<BeginInvokeAction>b__1b(IAsyncResult asyncResult)
the line in question: int compId = 0;
有问题的行: int compId = 0;
There are different causes for the error Object reference not set to an instance of an object
.错误
Object reference not set to an instance of an object
有多种原因。
It indicates that your code is trying to work with an object that has a null value as its reference.它表明您的代码正在尝试使用具有空值作为其引用的对象。
To resolve this you might need to change the value 0
to “??”
要解决此问题,您可能需要将值
0
更改为“??”
For more information please refer this Blog
for similar issues.有关更多信息,请参阅此
Blog
以了解类似问题。
To remote debug in Azure please refer this MICROSOFT DOCUMENTATION .要在 Azure 中进行远程调试,请参阅此MICROSOFT DOCUMENTATION 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.