簡體   English   中英

找不到與綁定WSHttpBinding的端點匹配方案http的基地址。 注冊的基址方案為[https]

[英]Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [https]

我去過幾個站點,了解如何更正此錯誤,無法擺脫該錯誤。 我在啟用SSL的IIS 6上托管它。 下面是我的配置

 <services>
            <service behaviorConfiguration="UsernamePasswordBehavior" name="DataServices.BEService">    

                <endpoint address="mex" binding="mexHttpsBinding" name="mex" contract="IMetadataExchange"  listenUri="https://mysite/beservice.svc"/>

                <endpoint address="wsbe" binding="wsHttpBinding" bindingConfiguration="wsHttpWithUsernamePassword"
                    name="BEwsHttp" contract="DataServices.IBEService" listenUri="https://mysite/beservice.svc" />               
            </service>
</services>

    <bindings>          
        <wsHttpBinding>
                    <binding name="wsHttpWithUsernamePassword" sendTimeout="00:06:00"  receiveTimeout="00:06:00">
                        <security mode="Message">
                            <message clientCredentialType="UserName"/>
                            </security>                    
                    </binding>
            </wsHttpBinding>
        </bindings>


     <behaviors>
                <serviceBehaviors>
                   <behavior name="UsernamePasswordBehavior">
                        <serviceMetadata httpsGetEnabled="true"/>
                        <serviceDebug includeExceptionDetailInFaults="true" />                    
                        <serviceCredentials>
                            <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="DataServices.CustomUsernameValidator, DataServices" />
                            <serviceCertificate findValue="*.mysite.com" storeLocation="LocalMachine" storeName="My"  x509FindType="FindBySubjectName"/>                        
                        </serviceCredentials>                                      
                    </behavior>                
                </serviceBehaviors>
            </behaviors>

希望有人能幫忙!

聽起來好像您托管的IIS網站實例僅配置了HTTPS(SSL)。 右鍵單擊該網站實例,然后選擇“編輯綁定...”。 您是否在其中看到端口80(普通HTTP)? 還要檢查“ SSL設置”功能,以確保未打開“始終需要”選項。 -取自Stack溢出本身。 它可以正常工作,因為您僅在配置中使用消息安全性,該站點必須綁定一個非HTTPS / SSL地址。 在本地計算機上使用自簽名證書時,代碼是否正常工作?

我認為你需要使用

<security mode="TransportWithMessageCredential">

為了您的安全模式,而不是消息?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM