All Products
Search
Document Center

Object Storage Service:OSS SDK for C#

Last Updated:Oct 08, 2026

OSS SDK for C# supports .NET Framework 2.0 and later. Based on version 2.8.0.

Compatibility

  • For SDKs 2.x.x:

    • API operations: compatible

    • Namespace: compatible

  • For SDKs 1.0.x:

    • API operations: compatible

    • Namespace: incompatible. Aliyun.OpenServices.OpenStorageService was renamed to Aliyun.OSS.

Source code and API reference

Access the SDK source code on GitHub and the API reference.

Sample code

The following table lists sample code available on GitHub.

Sample code file

Content

PutObjectSample.cs

Overview

AppendObjectSample.cs

Append upload (OSS SDK for C# 1.0)

DoesObjectExistSample.cs

Check whether a file exists (C# SDK V1)

DeleteObjectsSample.cs

Delete objects (OSS SDK for C# 1.0)

CopyObjectSample.cs

Copy a file (C# SDK V1)

ModifyObjectMetaSample.cs

Manage object metadata (OSS SDK for C# 1.0)

MultipartUploadSample.cs

Multipart upload (OSS SDK for C# 1.0)

ResumableSample.cs

Resumable upload (OSS SDK for C# 1.0)

GetObjectSample.cs

Overview

GetObjectByRangeSample.cs

Range download (C# SDK V1)

GetObjectAclSample.cs

Manage object ACLs (OSS SDK for C# 1.0)

SetObjectAclSample.cs

Manage object ACLs (OSS SDK for C# 1.0)

ListObjectsSample.cs

List objects (OSS SDK for C# 1.0)

UrlSignatureSample.cs

Upload a file using a signed URL (C# SDK V1)

UploadCallbackSample.cs

Upload callbacks

ProgressSample.cs

Upload progress bar and Download progress bar

CNameSample.cs

Use a custom domain name to access OSS

PostPolicySample.cs

PostObject

CreateBucketSample.cs

Create a bucket (C# SDK V1)

DeleteBucketSample.cs

Delete buckets

DoesBucketExistSample.cs

Determine whether a bucket exists

ListBucketsSample.cs

List buckets

SetBucketAclSample.cs

Manage bucket ACLs

SetBucketLifecycleSample.cs

Lifecycle rules (OSS SDK for C# 1.0)

SetBucketLoggingSample.cs

Log storage (C# SDK V1)

SetBucketRefererSample.cs

Hotlink protection (C# SDK V1)

SetBucketWetbsiteSample.cs

Static website hosting (C# SDK V1)

SetBucketCorsSample.cs

CORS (OSS SDK for C# 1.0)

ImageProcessSample.cs

Image processing (C# SDK v1)

References