By default, the V2.0 SDK uses the HTTPS protocol to access Alibaba Cloud services. To select a different communication protocol, you can use the Protocol parameter of AlibabaCloud.OpenApiClient.Models.Config. The supported values are HTTP and HTTPS. For secure data transmission, always use the HTTPS protocol.
var config = new AlibabaCloud.OpenApiClient.Models.Config{
// Other configurations are omitted.
Protocol = "HTTPS", // Set the protocol. Options: HTTPS, HTTP. Default: HTTPS.
};When you access services over HTTPS, the SDK enables SSL/TLS certificate verification by default. If your environment does not have the required certificates, a certificate verification error may occur. You can use the IgnoreSSL parameter of AlibabaCloud.TeaUtil.Models.RuntimeOptions to enable or disable SSL/TLS certificate verification. For example, in a test environment, you can set IgnoreSSL to true to skip certificate verification.
Enable SSL/TLS certificate verification in production environments.
AlibabaCloud.TeaUtil.Models.RuntimeOptions runtime = new AlibabaCloud.TeaUtil.Models.RuntimeOptions{
// true: Ignores certificate verification. false: Enables certificate verification. By default, verification is enabled.
IgnoreSSL = true,
};