嘗試在Windows XP上配置自託管WCF服務的SSL端點。我的配置在Windows 7上正常工作;但Windows XP,使用相同的證書,不響應。我得到一個服務器未找到錯誤。Win XP上的自託管WCF SSL失敗
當我運行netstat -an時,我可以看到該服務正在偵聽端口443.沒有衝突的應用程序偵聽端口並且防火牆關閉。
有沒有人見過這個?任何想法如何解決?
運行httpcfg query ssl
產生如下:
C:\Documents and Settings\Kane>httpcfg query ssl
IP : 0.0.0.0:443
Hash : 4857fcdc71a69b8df67bb7cb7c6fb1073a08f23
Guid : {00000000-0000-0000-0000-000000000000}
CertStoreName : (null)
CertCheckMode : 0
RevocationFreshnessTime : 0
UrlRetrievalTimeout : 0
SslCtlIdentifier : (null)
SslCtlStoreName : (null)
Flags : 0
------------------------------------------------------------------------------
IP : 0.0.0.0:8443
Hash : 4857fcdc71a69b8df67bb7cb7c6fb1073a08f23
Guid : {00000000-0000-0000-0000-000000000000}
CertStoreName : (null)
CertCheckMode : 0
RevocationFreshnessTime : 0
UrlRetrievalTimeout : 0
SslCtlIdentifier : (null)
SslCtlStoreName : (null)
Flags : 0
------------------------------------------------------------------------------
下面是我的配置文件:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
</system.web>
<system.serviceModel>
<protocolMapping>
<add binding="webHttpBinding" scheme="http"/>
</protocolMapping>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="false"/>
<services>
<service name="SomeWindowsService.SomeService" behaviorConfiguration="webServiceBehaviorConfig">
<host>
<baseAddresses>
<add baseAddress="http://*:8080/"/>
<add baseAddress="https://*/ssl/"/>
</baseAddresses>
</host>
<!-- this endpoint is exposed at the base address provided by host: http://localhost:8080/someservice -->
<endpoint address="" binding="webHttpBinding" behaviorConfiguration="WebHttpEndPointBehaviour" contract="SomeWindowsService.IFileAccessService"/>
<endpoint name="someservice" address="someservice" binding="basicHttpBinding" bindingConfiguration="soapBindingConfig" contract="someservice"/>
<endpoint name="someserviceSSL" address="ssl/someservice" binding="basicHttpBinding" bindingConfiguration="sslBindingConfig" contract="someservice"/>
<endpoint address="mex" binding="mexHttpBinding" name="MetadataBinding" contract="IMetadataExchange"/>
</service>
</services>
<!--Bindings-->
<bindings>
<basicHttpBinding>
<binding name="soapBindingConfig" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="None"/>
<readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" />
</binding>
<binding name="sslBindingConfig" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="Transport"/>
<readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<!--Behaviors-->
<behaviors>
<serviceBehaviors>
<behavior name="webServiceBehaviorConfig">
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceMetadata httpGetEnabled="true" httpGetUrl="mex" httpsGetEnabled="true" httpsGetUrl="mex" />
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="WebHttpEndPointBehaviour">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/><AutoStartTerminals>false</AutoStartTerminals></startup></configuration>
奇怪的是,我沒有從瀏覽器或任何東西獲得證書警告。就好像沒有人在聽。如果有幫助,我會從提琴手那裏得到一個http 502。 –