[英]how to host WCF Duplex service on internet
我有一個帶有WSDualHttpBinding的WCF服務,該服務在本地運行良好,當我將其托管在IIS上時不起作用,首先是要求憑據登錄以在綁定上未設置身份驗證的情況下進行登錄,但是我將其設置為安全模式現在沒有響應,當我從客戶端發出請求時,它只是等待,等待響應,然后超時。
任何建議或示例將不勝感激。
<system.serviceModel>
<services>
<service name ="NewEngine.Engine" behaviorConfiguration ="serviceBehaviourSoap" >
<endpoint name ="duplexendpoint" address ="" binding ="wsDualHttpBinding" contract ="NewEngine.IEngine" bindingConfiguration="wsDualBinding"/>
<endpoint name ="MetaDataTcpEndpoint" address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehaviourSoap">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsDualHttpBinding>
<binding name="wsDualBinding" closeTimeout="00:00:05" openTimeout="00:00:05" receiveTimeout="00:10:00" sendTimeout="00:00:05" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" />
<security mode="None" >
<message clientCredentialType="None"/>
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
我上周遇到了同樣的問題。 我刪除了此行<message clientCredentialType =“ None” />,它的效果很好。 你可以試試
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.