天蓝色的内部服务器错误

时间:2016-04-07 04:27:06

标签: azure internal-server-error azure-web-app-service asp.net-mvc-5



我是azure的新手(第一次)。我有一个ASP.NET MVC v5.2.3,我将我的项目发布到azure app服务。
它在我的本地工作正常,但在天蓝色中它在控制台的xhr.send( ( s.hasContent && s.data ) || null );行显示 500内部服务器错误 我在我的web.config文件中添加了<customErrors mode="Off"/>。 我正在使用ajax执行搜索操作,如下所示。

@{
    AjaxOptions options = new AjaxOptions
    {
        UpdateTargetId = "search_result",
        InsertionMode = InsertionMode.Replace,
        LoadingElementId = "divLoading"
    };
}

@using (Ajax.BeginForm(MVC.EmployeeRating.EmployeeRating.SearchPerson(), options))
{
    <div id="divLoading" style="color:red;width:180px;background-color:yellow;font-size:larger;display:none;position:absolute;">Loading ....</div>
        <div>
            @Html.TextBox("searchString", null, new { id = "txtSearch" })
            @Html.HiddenFor(m => Model.WeekNumber)
            @Html.Hidden("userId", (object)ViewBag.UserId)
            <button type="submit" style="background-color: #222; color: white; height: 30px">Search Person</button>
        </div>
}

<br />

<div id="search_result"> </div>

在我的控制器中我有

 public virtual PartialViewResult SearchPerson(string searchString, int weekNumber, Guid userId)
        {
            var employees = new EmployeeList();

            var empDetails = employees.SearchEmployees(userId, weekNumber)
                            .Where(x => x.FullName.ToUpper().Contains(searchString.ToUpper().Trim()));

            return PartialView(empDetails);
        }

当我点击500内部服务器错误时,它在weekNumber上显示为null。但现在它不再显示它,而是指向jquery-1.10.2.js:8720(所有这一切只发生在azure上)。我正在尝试调试使用附加调试器到应用程序服务。在理解它发生的位置时没有运气。

请帮帮我。

0 个答案:

没有答案