Home > Net >  ASP.NET MVC use ali OSS SDK error: unable to send with this verb type the content of the text
ASP.NET MVC use ali OSS SDK error: unable to send with this verb type the content of the text

Time:12-21

In the use of ali cloud OSS the.net languages SDK, always show "unable to send the content of the text with this verb type", is still unresolved after baidu, strives for the big help,

Environment is the ASP.NET MVC Framework: 4.8,



The method code:

Public ActionResult ImgList ()
{
List ImgList=new List (a);
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
  • Related