I have this menu in _Layout.cshtml
@if (Response.Cookies["UserSession"]["UserRole"] == "Rh" || Response.Cookies["UserSession"]["UserRole"] == "Admin")
{
<li>
<a href="#"><i class="fa fa-bar-chart-o"></i> RH - Relatórios<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
@Html.ActionLink("Financiamento de veículos", "ExcelFinancing", "FinancingReport")
</li>
</ul>
</li>
}
The problem is that when calling this menu item, it should stop on the break within Action in the controller. This is Action on the controller controller
[HttpGet]
public ActionResult ExcelFinancing(DateTime dateFinancing)
{
var t = 1 * 9;//Teste apenas, break aqui
return null;
}
What happens is that when I click on this menu item, it gives me the error of type 500, internal server error. How do I get into the controller by calling the Menu?
NOTE: I have another view called View.cshtml that inherits from _Layout.cshtml and I have other functions. Should I do something from it? Or would the call only in _Layout.cshtml suffice?