I am getting NullReferenceException
in .cshtml
at line 2, but this same code is working fine on local. When I deployed it to uat, it is generating this error – how should I approach this error? What methods to debug this?
This is my .cshtml
:
@{
Layout = null;
}
@model Test.Terminal.UI.Models.UserLoginModel
<!DOCTYPE html>
My controller call
public ActionResult RASLogin()
{
return View();
}
When I remove Layout = null
line, it will generate an error at line 0. Some answers suggest that I have to pass default model which I also tried but it’s not working.
2