【发布时间】:2017-10-23 06:26:11
【问题描述】:
我设法创建了一个带有自签名SSL 到IIS 的网络service。它的设置首先设置为客户端证书无和不需要SSL。到那时已经可以访问网络浏览器和移动网络参考了。
但是当我将 SSL 设置设置为必需时,现在两者都被禁止。 SSL 配置的设置中缺少什么?
网络配置
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="constring" providerName="System.Data.SqlClient" connectionString="Data Source = source;Initial Catalog = dbname; User ID = user; Password = pw" />
</connectionStrings>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation targetFramework="4.5" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding maxReceivedMessageSize="10485760" name="SecureHttpBinding">
<readerQuotas maxStringContentLength="10485760"></readerQuotas>
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
</configuration>
【问题讨论】:
-
我没试过,但是你看到这部分了吗:Using Transport Security?
-
不,这是我第一次看到它并感谢它。请问我应该把这些代码放在哪里?
-
试试这个教程:UsingTrustedRootsRespectfully.
-
我已经找到了答案。感谢您的链接,但似乎这不是我正在寻找 xamarin.android 网络参考的答案
标签: web-services wcf ssl iis xamarin.android