我有一個嵌入到Windows服務的WCF服務。它綁定到本地主機,但它也接受來自這種URL的連接 - 「http:// ip:port/ServiceName」,我怎樣才能將它隱藏起來,並且只允許從本地主機連接。如何隱藏我的WCF服務
這裏是我的服務配置
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="Test.Service.ServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="Test.Service.ServiceBehavior" name="Test.Service.TestService">
<endpoint address="localhost" binding="wsHttpBinding" contract="Test.Service.IService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8732/MyService/service" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
非常感謝您的幫助) – mironych 2010-11-24 11:53:48