The OSS C# SDK supports .NET Framework 2.0 and later. This document is written based on OSS C# SDK 2.8.0.

  • For SDK series of 2.x.x

    • API: compatible
    • Namespace: compatible
  • For SDK series of 1.0.x

    • API: compatible
    • Namespace: incompatible. Aliyun.OpenServices.OpenStorageService is changed to Aliyun.OSS

SDK source code and API documents

For the SDK source code, see GitHub. For more information, see API documents.

Code samples

OSS SDK for C# provides a variety of code samples for your reference or use. You can obtain the code samples from GitHub. The following table describes the content of code samples.

Sample file Content
PutObjectSample.cs Upload objects
AppendObjectSample.cs Append upload
DoesObjectExistSample.cs Determine whether an object exists
DeleteObjectsSample.cs Delete objects
CopyObjectSample.cs Copy objects
ModifyObjectMetaSample.cs Manage Object Meta
MultipartUploadSample.cs Multipart upload
ResumableSample.cs Resumable upload
GetObjectSample.cs Download objects
GetObjectByRangeSample.cs Range download
GetObjectAclSample.cs Manage ACL for an object
SetObjectAclSample.cs Manage ACL for an object
ListObjectsSample.cs List objects
UrlSignatureSample.cs Authorized access
UploadCallbackSample.cs Upload callback
ProgressSample.cs Upload progress bars and Download progress bars
CNameSample.cs Use custome domain name to access OSS (CNAME)
PostPolicySample.cs Form upload
CreateBucketSample.cs Create a bucket
DeleteBucketSample.cs Delete a bucket
Doesbucketexistsample. CS Determine whether a bucket exists
ListBucketsSample.cs List buckets
SetBucketAclSample.cs Configure an ACL for a bucket
SetBucketLifecycleSample.cs Lifecycle management
SetBucketLoggingSample.cs Access log files
SetBucketRefererSample.cs Hotlink protection
SetBucketWetbsiteSample.cs Static website hosting
SetBucketCorsSample.cs CORS
ImageProcessSample.cs Image processing