0
我已經創建了wcf服務並希望使用http和https版本。服務由IIS 6.0託管。WCF http&https終結點合同
在我的配置我有:
<bindings>
<basicHttpBinding>
<binding name="BindingConfiguration1" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None"/>
<message clientCredentialType="UserName" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service name="RegistratorService.Registrator" behaviorConfiguration="RegistratorService.Service1Behavior">
<endpoint binding="basicHttpBinding"
contract="RegistratorService.IRegistrator"
bindingConfiguration="BindingConfiguration1">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint binding="basicHttpBinding" contract="RegistratorService.IRegistrator">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
<host>
<baseAddresses>
<add baseAddress="http://aurit-server2" />
</baseAddresses>
</host>
</service>
</services>
但即使在瀏覽器我有例外「所提供的URI方案‘HTTP’是無效的;預期的‘https’」
有什麼不對? 謝謝。
只是一個猜測,但你指定'TransportWithMessageCredential'。通過http很難做到這一點。 – 2010-04-05 03:51:15
所以我想通過https實現這一點 – 2010-04-05 04:30:30