Визуальная веб-часть ajax http 500 внутренняя ошибка сервера
Hello, I have created visual web part for fetching data from SharePoint list and display on it. For fetching data from list I have used server object model. For fetching data from SharePoint list I have created "Application Page" and written code in it. In application page I have mentioned the method as a "[WebMethod]".I am calling application page method by using Ajax (i.e. from Sample.ascx page). On search button I have written code for calling Application Page method "GetFilterResults" by using Ajax. Problem is that when I click on search button it is giving error 500 Internal Server error that is Ajax is not calling "GetFilterResults" method it jumps to the "error method of Ajax". One thing to mention is that, the code is working fine on Development, System Test and UAT environment only it is not working on "Production" environment. Below is the sample code in Visual Web Part page (i.e. in Sample.ascx page).
Что я уже пробовал:
//Call Ajax function for getting filter condition results from Content Metadata Master List var parameters = { arrFilters: FilterArray, arrFilterCondition: FilterConditionArray }; $.ajax({ type: "POST", async: false, url: "/_layouts/15/BulkWorkflow/BulkWorkflowCode.aspx/GetFilterResults", data: JSON.stringify(parameters), contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) { var data1 = jQuery.parseJSON(response.d) for (var i in data1) { alert(data1[i].ContentID + ", " + data1[i].ContentName + " , " + data1[i].ContentTitle); } }, error: function (xhr, ajaxOptions, thrownError) { alert("Error"); alert(xhr.status); alert(thrownError); } });
And code in Application page (i.e. in BulkWorkflowCode.aspx page),
[WebMethod] public static string GetFilterResults(string[] arrFilters, string[] arrFilterCondition) { //Code for fetching data from SharePoint list and return output as a String }
also I have checked the error logs in Fiddler tool
это дает следующую ошибку,
{"Message":"произошла ошибка обработки запроса.", "StackTrace":"", " ExceptionType":""}