This topic describes how to use the server SDK for .NET provided by ApsaraVideo Live and provides sample code.
Environment requirements
.NET Framework 4.5 or later, or .NET Core 2.0 or later.
Procedure
Import the SDK.
Log on to SDK Center.
On the Install page, set SDK Generation to V2.0 and select .NET for the language. On the Quick Start tab, find the installation method section.

Create a project and use the Credentials tool to manage access credentials. For more information, see Manage access credentials.
Initiate the API request and handle the response or exception.
// This file is auto-generated, don't edit it. Thanks. using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using Tea; using Tea.Utils; namespace AlibabaCloud.SDK.Sample { public class Sample { /// <term><b>Description:</b></term> /// <description> /// <para>Use credentials to initialize the client.</para> /// </description> /// /// <returns> /// Client /// </returns> /// /// <term><b>Exception:</b></term> /// Exception public static AlibabaCloud.SDK.Live20161101.Client CreateClient() { // Avoid hardcoding your AccessKey pairs. For details, see https://help.alibabacloud.com/document_detail/378671.html Aliyun.Credentials.Client credential = new Aliyun.Credentials.Client(); AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config { Credential = credential, }; // For endpoints, refer to https://api.alibabacloud.com/product/live config.Endpoint = "live.aliyuncs.com"; return new AlibabaCloud.SDK.Live20161101.Client(config); } public static void Main(string[] args) { AlibabaCloud.SDK.Live20161101.Client client = CreateClient(); AlibabaCloud.SDK.Live20161101.Models.DescribeLiveDomainMappingRequest describeLiveDomainMappingRequest = new AlibabaCloud.SDK.Live20161101.Models.DescribeLiveDomainMappingRequest { RegionId = "<Your RegionId>", DomainName = "<Your DomainName>", }; AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions(); try { // Print the return value of the API. client.DescribeLiveDomainMappingWithOptions(describeLiveDomainMappingRequest, runtime); } catch (TeaException error) { // The following code is for demonstration purposes only. Handle exceptions with caution. Do not ignore exceptions in your project. // Error message Console.WriteLine(error.Message); // Diagnosis address Console.WriteLine(error.Data["Recommend"]); AlibabaCloud.TeaUtil.Common.AssertAsString(error.Message); } catch (Exception _error) { TeaException error = new TeaException(new Dictionary<string, object> { { "message", _error.Message } }); // The following code is for demonstration purposes only. Handle exceptions with caution. Do not ignore exceptions in your project. // Error message Console.WriteLine(error.Message); // Diagnosis address Console.WriteLine(error.Data["Recommend"]); AlibabaCloud.TeaUtil.Common.AssertAsString(error.Message); } } } }