的情况:
问题
根据这些约束条件,使用什么是最好的协议? default?
<!--define a SOAP binding-->
<wsHttpBinding>
<binding name="DefaultSOAPBasedHTTPSBinding" maxReceivedMessageSize="400000">
<readerQuotas maxArrayLength="102400" />
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</wsHttpBinding>为使会议能够:
<wsHttpBinding>
<binding name="DefaultSOAPBasedHTTPSBinding" maxReceivedMessageSize="400000">
<readerQuotas maxArrayLength="102400" />
<reliableSession enabled="true" />
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Basic" />
<message clientCredentialType="Certificate"/>
</security>
</binding>
</wsHttpBinding>我的感觉是,这种传输和消息安全太多了--我的意思是,为了允许与wsHttpBinding进行会话,我们真的需要这样做吗?
发布于 2010-06-17 13:12:05
我建议使用以下绑定配置以及每次调用:
<wsHttpBinding>
<binding name="DefaultSOAPBasedHTTPSBinding" maxReceivedMessageSize="400000">
<readerQuotas maxArrayLength="102400" />
<security>
<message clientCredentialType="Username"/>
</security>
</binding>
</wsHttpBinding>希望能帮上忙!
发布于 2010-06-19 16:17:08
所以,最后我使用会话,因为它没有太大的性能影响。这也是一个限制,我们应该知道如何通过网络服务与我们交谈。所以我们需要认证。
博德的回答有很大帮助--不过,缺少的是自定义名称和密码--验证器:http://msdn.microsoft.com/en-us/library/aa702565.aspx
使用此web.config:
<wsHttpBinding>
<binding name="DefaultSOAPBasedHTTPSBinding" maxReceivedMessageSize="400000">
<readerQuotas maxArrayLength="102400"/>
<reliableSession enabled="true"/>
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Basic"/>
<message clientCredentialType="UserName"/>
</security>
</binding>
</wsHttpBinding>也许它能帮到某人..。
当发现这些神奇的WCF配置问题时,WCF跟踪也是一个很大的帮助:
<system.diagnostics>
<trace autoflush="true"/>
<sources>
<source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
<listeners>
<add name="sdt" type="System.Diagnostics.XmlWriterTraceListener" initializeData="SdrConfigExample.e2e"/>
</listeners>
</source>
</sources>
</system.diagnostics>https://stackoverflow.com/questions/3061316
复制相似问题