2009-09-23 134 views
1

我有一個WCF服務在啓用netTCP的IIS7中託管。在IIS中使用netTCP綁定託管的WCF服務

這是我在%apppath%\中的web.config,其中SVC文件是。

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <system.serviceModel> 
    <services> 
     <service name="Search.Querier.WCF.Querier" behaviorConfiguration="SearcherServiceBehavior"> 
     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost:8050/SearcherService"/> 
      </baseAddresses> 
     </host> 
     <endpoint address="net.tcp://localhost:9000/SearcherService" 
        binding="netTcpBinding" 
        bindingConfiguration="Binding1" 
        contract="Search.Querier.WCF.IQuerier" /> 
     </service> 
    </services> 
    <bindings> 
     <netTcpBinding> 
     <binding name="Binding1" 
        hostNameComparisonMode="StrongWildcard" 
        sendTimeout="00:10:00" 
        maxReceivedMessageSize="65536" 
        transferMode="Buffered" 
        portSharingEnabled="false"> 
      <security mode="None"> 
      <transport clientCredentialType="None" /> 
      <message clientCredentialType="None" /> 
      </security> 
     </binding> 
     </netTcpBinding> 
    </bindings> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="SearcherServiceBehavior"> 
      <serviceMetadata httpGetEnabled="true" httpGetUrl=""/> 
      <serviceDebug includeExceptionDetailInFaults="true" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 
    <system.web> 
    <compilation debug="true" /> 
    </system.web> 
</configuration> 

出於某種原因,而不是在端口8050載荷爲我說明,我看到一個顯示在現場的藍色和米色的網站:

http://localhost/SearcherService/searcherservice.svc 而不是 http://localhost:8050/SearcherService/searcherservice.svc

此外,當我嘗試運行

svcutil.exe http://process.mycomp.com/SearcherService/SearcherService.svc?wsdl

作爲呈現在URL上的頁面說,我得到一個錯誤:

Metadata contains a reference that cannot be resolved: 'http://process.mycomp.com/SearcherService/SearcherService.svc?wsdl' 

但我在我的web.config

指定的其他地方還有其它地方也可能是?

回答