Xamarin. X509Certificate and ClientBase

3
我正在开发一个与 Web 服务配合的 Xamarin 应用程序。
Xamarin 是否支持 System.ServiceModel.ClientBase 中的 X509Certificate?
下面的代码适用于使用 .Net 4.5 构建的项目:
public void Initialize()
    {
        var binding = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
        binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;

        var endpoint = new EndpointAddress("https://ThereIsMyServerAddress/PathToService");

        _mobileService = new ServiceClient(binding, endpoint);

        _mobileService.ClientCredentials.ClientCertificate.Certificate = new X509Certificate2("Ivanov_Ivan_Ivanovich.cer");

    }

但是Xamarin在ClientCredentials中没有看到ClientCertificate.Certificate。是否有办法将证书添加到ServiceClient中?

使用证书很重要吗?你可以忽略它。 - Dima
1个回答

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接