c# - AWS SDK for .NET ListBuckets error -


i using simple aws sdk .net documentation sample, in c# windows application, in order list buckets , receiving error below. can create buckets , upload files fine can not listing/getting of buckets/objects? please me out? thanks.

error message - there error in xml document (2, 2).

error inner exception - not expected."

error stacktrace - @ system.xml.serialization.xmlserializer.deserialize(xmlreader xmlreader, string encodingstyle, xmldeserializationevents events)\r\n @ system.xml.serialization.xmlserializer.deserialize(xmlreader xmlreader)\r\n @ amazon.s3.amazons3client.processrequestresponse[t](httpwebresponse httpresponse, s3request request, type t, t& response, exception& cause)\r\n @ amazon.s3.amazons3client.handlehttpresponse[t](s3request userrequest, httpwebrequest request, httpwebresponse httpresponse, int32 retries, int64 lengthofrequest, t& response, exception& cause, httpstatuscode& statuscode)\r\n @ amazon.s3.amazons3client.getresponsecallback[t](iasyncresult result)\r\n @ amazon.s3.amazons3client.endoperation[t](iasyncresult result)\r\n @ amazon.s3.amazons3client.endlistbuckets(iasyncresult asyncresult)\r\n @ amazon.s3.amazons3client.listbuckets(listbucketsrequest request)\r\n @ amazon.s3.amazons3client.listbuckets()\r\n

//code

using (amazons3 amazons3 = setamazons3client()) {     using (listbucketsresponse response = amazons3.listbuckets())     {         foreach (s3bucket bucket in response.buckets)         {             console.writeline("you own bucket name: {0}", bucket.bucketname);         }     } } 

your sample code works fine me... think error specific environment:

  • odd/explicit permissions on iam user aws credentials associated with?
  • nonstandard characters in of existing bucket names?
  • old version of awssdk?

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -