Skip to content

请问.Net版,创建桶提示“This stream does not support seek operations.”错误码空能是什么问题. #39

@yty

Description

@yty

完全用的官方代码测试的。

 private static ObsClient client;
    private static string bucketName = "my-obs-bucket-demo";   

public void Setup(string accessKeyId, string secretAccessKey, string securityToken, string endPoint)
    {
        client = new ObsClient(accessKeyId, secretAccessKey, securityToken,endPoint);
    }
      
  static void CreateBucket()
        {
            try
            {
                CreateBucketRequest request = new CreateBucketRequest()
                {
                    BucketName = bucketName
                };
                CreateBucketResponse response = client.CreateBucket(request);

                Console.WriteLine("Create bucket response: {0}", response.StatusCode);
            }
            catch (ObsException ex)
            {
                Console.WriteLine("Exception errorcode: {0}, when create a bucket.", ex.ErrorCode);
                Console.WriteLine("Exception errormessage: {0}", ex.ErrorMessage);
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions