0
在UWP客戶端,HttpClient的忽略SSL可以使用HttpBaseProtocolFilter,像ODATA上UWP客戶忽略SSL
var filter = new HttpBaseProtocolFilter();
filter.CacheControl.ReadBehavior = HttpCacheReadBehavior.MostRecent;
filter.IgnorableServerCertificateErrors.Add(ChainValidationResult.Expired);
filter.IgnorableServerCertificateErrors.Add(ChainValidationResult.Untrusted);
filter.IgnorableServerCertificateErrors.Add(ChainValidationResult.InvalidName);
Windows.Web.Http.HttpClient webhttpClient = new Windows.Web.Http.HttpClient(filter);
但是,我怎麼能使用OData的UWP客戶端上,而忽略SSL?
Uri baseUri = new Uri(baseUriStr);
Container container = new Container(baseUri);
非常感謝。