我正在使用 VSTS 2008 + C# + .Net 3.0。我正在使用自托管的 WCF。执行以下语句(host.Open())时,出现以下绑定未找到错误。我已经发布了我的整个 app.config 文件,有什么想法有什么问题吗?
ServiceHost host = new ServiceHost(typeof(MyWCFService));
host.Open();
错误信息,
无法解析属性“algorithmSuite”的值。错误是:值“Aes128”不是“System.ServiceModel.Security.SecurityAlgorithmSuite”类型的有效实例。
EDIT1:我已将算法套装选项值更改为默认值,但在执行 Open() 时遇到了一个新错误,错误消息是,任何想法有什么问题,
绑定验证失败,因为 WSHttpBinding 不支持基于传输安全 (HTTPS) 的可靠会话。无法打开通道工厂或服务主机。使用消息安全性通过 HTTP 进行安全可靠的消息传递。
完整的 app.config,
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="MyBinding"
closeTimeout="00:00:10"
openTimeout="00:00:20"
receiveTimeout="00:00:30"
sendTimeout="00:00:40"
bypassProxyOnLocal="false"
transactionFlow="false"
hostNameComparisonMode="WeakWildcard"
maxReceivedMessageSize="100000000"
messageEncoding="Mtom"
proxyAddress="http://foo/bar"
textEncoding="utf-16"
useDefaultWebProxy="false">
<reliableSession
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Digest"
proxyCredentialType="None"
realm="someRealm" />
<message clientCredentialType="Windows"
negotiateServiceCredential="false"
algorithmSuite="Default"/>
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="MyWCFService"
behaviorConfiguration="mexServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="https://localhost:9090/MyService"/>
</baseAddresses>
</host>
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="MyBinding" contract="IMyService"/>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="mexServiceBehavior">
<serviceMetadata httpsGetEnabled="True"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
提前谢谢,乔治