2013-04-01 26 views
0

如何爲WCF添加非https端點?我的WCF是Azure項目中的Web角色。爲WCF發佈非https端點 - Azure

我目前的終點是:

<bindings> 
     <basicHttpBinding> 
     <binding name="SecureBasic" proxyAddress="http://localhost:80"> 
      <security mode="Transport"> 
      <transport clientCredentialType="None"/> 
      </security> 
     </binding> 
     </basicHttpBinding> 
    </bindings> 


    <services> 
     <service name="WebRoleUploadImages.UploadImages"> 
     <host> 
      <baseAddresses>   
      <add baseAddress="http://localhost:80"/> 
      </baseAddresses> 
     </host> 

     <endpoint address="WCFSecure" binding="basicHttpBinding" bindingConfiguration="SecureBasic" 
      name="SecureHTTPSendpoint" contract="WebRoleUploadImages.IUploadImages"> </endpoint>  

     </service> 
    </services> 

的事情是我還沒有SSL證書,所以我不能沒有HTTP端點

+1

你有沒有想過使用[自簽名證書]測試(http://en.wikipedia.org/wiki/Self-signed_certificate)?根據您的應用程序/使用情況,SSL和SSL之間的行爲可能會有很大差異,這使得測試毫無價值。 –

+0

我確實使用了一個自簽名證書,但它說:'沒有端點在https://myserver/UploadImages.svc/WCFSecure處接收該消息。這通常是由不正確的地址或SOAP操作引起的。有關更多細節,請參閱InnerException(如果存在)。' –

回答

1

這不是一個天藍色的限制測試我的應用程序,但WCF限制。基本身份驗證以純文本形式發送密碼,如果沒有SSL認證,這是一個非常糟糕的主意。如果這只是測試你可以欺騙它通過指定

<security mode="TransportCredentialOnly">