Environment is the ASP.NET MVC Framework: 4.8,
The method code:
Public ActionResult ImgList ()
{
List
Var client=new OssClient (the endpoint, accessKeyId accessKeySecret);
//the following line error
Var listObjectsRequest=new listObjectsRequest (bucketName);
Var result=client. ListObjects (listObjectsRequest);
Foreach (var the summary in the result. ObjectSummaries)
{
ImgList. Add (summary. Key);
}
Return a Json (new ReUI (0, "", ImgList, 0));
}
Request method of interface:
$(function () {
$.post ('/Home/ImgList ', function (res) {
console.log(res);
});
});
Get tried, also