我正在使用VSTS 2008 + C#+ .Net 3.0。我正在使用自托管的WCF。执行以下语句(host.Open())时,会出现以下找不到的绑定错误。我发布了我的整个app.config文件,任何想法是什么错误?WCF wsHttpBinding'algorithmSuite'无法解析错误
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>
由于事先 乔治
乔治,我可以提个建议这里,而不是尝试调试每次迭代中,你可以张贴问题详细说明您正在努力实现,并要求适当的配置是什么?一点也不清楚你想要认证/授权/安全。 – blowdart 2009-06-22 09:48:37
我只想用wsHttpBinding开发一个服务,那么简单!我正在使用Windows集成安全性,因为我在Windows域中。 – George2 2009-06-22 09:57:07
如果你在Windows域 - 为什么不使用netTcp?更快,更可靠,更好,更少的开销? :-) – 2009-06-22 10:00:10