Azure WebJob"无法创建SSL/TLS安全通道"

Ash*_*ole 8 azure azure-web-sites azure-webjobs azure-webjobssdk

我有一个Azure WebJob,它在本地运行时工作正常,但在Azure中运行时会引发异常.WebJob正在通过HTTPS进行外部调用,在Azure中会产生此异常:

System.Net.WebException:请求已中止:无法创建SSL/TLS安全通道.在System.Net.HttpWebRequest.GetResponse()

我也尝试将安全协议设置为TLS,ServicePointManager但这对异常没有影响.这是我的代码片段.

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

var request = (HttpWebRequest)WebRequest.Create(url);
                request.Method = "GET";
Run Code Online (Sandbox Code Playgroud)

Azure是否阻止WebJobs上网或我做错了什么?

Yod*_*ese 0

尝试扩展到基本层。似乎免费/共享层不支持 SSL/TLS,即使您通过文件(而不是证书存储)使用它们。