[英]Getting 404 no endpoint listening error WCF 4.0 using Https basicHttpBinding over Transport security
[英]WCF service - Getting Runtime error in basicHttpBinding configuration transport clientCredentialType to Basic
我已經創建了一個Web服務,並且正在使用basicHttpBinding,但問題是,當我將clientCredentialType設置為None時,我可以訪問該服務,但是如果設置為Basic / Windows,則會收到類似“運行時錯誤”的錯誤。在IIS basic中使用身份驗證。 我需要basicHttpbinding的安全性。 如何解決這個問題。
Web.Config中的代碼:
<services>
<service name="HealthCareService" behaviorConfiguration="Behavior_Service1">
<endpoint address="" contract="IHealthCareService" binding="basicHttpBinding" bindingConfiguration="basicHttpBinding1" />
<endpoint address="mex" contract="IMetadataExchange" binding="mexHttpBinding"/>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding1">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="Behavior_Service1">
<serviceThrottling maxConcurrentSessions="10000"/>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
錯誤屏幕截圖:
如本MSDN文章中所述,在 WCF服務器上啟用跟蹤。 跟蹤應該為您提供足夠的信息來解決問題。
如果與clientCredentialType = None一起使用,則可能是您的客戶端配置不正確-客戶端和服務器的配置必須兼容。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.