且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Web部件ajax http 500内部服务器错误问题

更新时间:2023-09-20 22:30:10

.ajax({
type: POST
async false
url: / _ layouts / 15 / BulkWorkflow / BulkWorkflowCode.aspx / GetFilterResults
data:JSON.stringify(parameters),
contentType: application / json; charset = utf-8
dataType: json
成功:函数(响应){

var data1 = jQuery.parseJSON(response.d)

for var i in data1) {

alert(data1 [i] .ContentID + + data1 [i] .ContentName + + data1 [i] .ContentTitle);

}
},
错误:function(xhr,ajaxOptions,thrownError){
alert( 错误);
alert(xhr.status);
alert(thrownError);
}
});
.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 





它发出以下错误,



{消息:处理请求时出错。,StackTrace:,ExceptionType:}



it is giving following error,

{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}