2014-04-21 57 views
0

我需要掛接到通過Windows服務運行的舊服務,該服務通過HTTP在運行時啓動服務主機。我似乎無法找出如何讓我的「添加服務引用」的工作,我知道該服務正在運行的日誌文件顯示這裏是該服務的配置項:。將服務引用添加到舊服務

<system.serviceModel> 
    <bindings /> 
    <services> 
     <service behaviorConfiguration="blah.blah.WCF_Service.EngineServiceBehavior" name="blah.blah.WCF_Service.EngineService"> 
     <endpoint address="http://localhost:8455/EngineService/" binding="basicHttpBinding" bindingConfiguration="" name="Engine" bindingName="EngineBinding" contract="blah.blah.IEngineService"> 
      <identity> 
      <dns value="localhost" /> 
      </identity> 
     </endpoint> 
     <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="Mex" contract="IMetadataExchange" /> 
     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost:8455/EngineService/" /> 
      </baseAddresses> 
     </host> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="blah.blah.EngineServiceBehavior"> 
      <serviceMetadata httpGetEnabled="true" /> 
      <serviceDebug includeExceptionDetailInFaults="true" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 

它一個MEX端點被設置,但我看不出如何構造URL來獲取服務信息。

有什麼想法?

+1

你試過'http:// localhost:8455/EngineService/mex'嗎? –

+0

發現我遇到的問題是服務器阻塞了該端口。我只能打80.改變了防火牆設置,並能夠添加它。謝謝您的幫助! –

回答

1

看起來像你需要一些細節在你的項目中添加服務引用。 ,右鍵單擊'References',然後選擇'Add service reference ...'並輸入John Saunders提到的地址,然後單擊'Go'。 enter image description here

相關問題