SSL

2011-04-18 35 views
5

ile IIS Express'te barındırılan WCF hizmetine hizmet başvurusu ekleme sorunum Visual Studio 2010'da IIS Express'te barındırılan sade bir WCF hizmetim var. IIS Express, SSL kullanacak şekilde yapılandırıldı.SSL

SSL'ye geçiş yapmadan önce, hiçbir sorunum olmadı, ancak şimdi güncellemem, WCF Hizmetime bir servis başvurusu eklemektir (bu yalnızca normal bir IIS tarafından barındırılan svc dosyasıdır).

<system.serviceModel> 
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> 
<bindings> 
    <basicHttpBinding> 
    <binding name="MyBasicHttpBindingConfig" receiveTimeout="00:15:00" 
     sendTimeout="00:15:00" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> 
     <security mode="Transport" /> 
    </binding> 
    </basicHttpBinding>  
</bindings> 
<services> 
    <service name="TrueChecksService" behaviorConfiguration="TrueChecksServiceBehavior"> 
    <endpoint binding="basicHttpBinding" bindingConfiguration="MyBasicHttpBindingConfig" 
     name="TrueChecksServiceEndpoint" contract="TrueChecksAdminSL.Web.Services.ITrueChecksService" /> 
    <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" /> 
    </service> 
</services> 
<behaviors> 
    <serviceBehaviors> 
    <behavior name="TrueChecksServiceBehavior"> 
     <useRequestHeadersForMetadataAddress> 
     <defaultPorts> 
      <add port="44302" scheme="https"/> 
     </defaultPorts> 
     </useRequestHeadersForMetadataAddress> 
     <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true"/> 
     <serviceDebug includeExceptionDetailInFaults="false"/> 
    </behavior> 
    </serviceBehaviors> 
</behaviors> 

Ben özel bir yazmalı mıyım:

Error: Cannot obtain Metadata from https://localhost:44302/Services/TrueChecksService.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455 .WS-Metadata Exchange Error URI: https://localhost:44302/Services/TrueChecksService.svc Metadata contains a reference that cannot be resolved: 'https://localhost:44302/Services/TrueChecksService.svc'. Could not establish trust relationship for the SSL/TLS secure channel with authority 'localhost:44302'. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure.HTTP GET Error URI: https://localhost:44302/Services/TrueChecksService.svc There was an error downloading 'https://localhost:44302/Services/TrueChecksService.svc'. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure.

İşte şu anda benim yapılandırma: Ben WCFTestClient kullandığınızda

, biraz daha kullanışlı hatası alıyorum Sertifika doğrulayıcı, IIS Express kendinden imzalı bir sertifika oluşturduğundan beri? Bunu yapmadan çözmeye çalışıyorum çünkü IIS'ye dağıttığımda, site bir sertifika yetkilisi tarafından verilen bir sertifika ile yapılandırılacak.

Yardımlarınız için teşekkür ederiz.

cevap

3

URL'ye göz atın. Web sitesinin güvenlik sertifikasıyla ilgili bir sorun olduğuna dair uyarı görürsünüz. what-do-i-need-to-do-to-get-ie8-to-accept-a-self-signed-certificate'daki adımları izleyin. Bu başarılı olduğunda ve IE'de bu uyarıyı almadan siteye gidebilirseniz, WCFClient de buna ulaşabilir.

+0

Daha spesifik olarak amit_g'nin işaret ettiği bu cevaptan bu yönergelerin yönlerini takip edin. http://stackoverflow.com/a/1412118/83658 – jpierson