2012-06-04 134 views
0

我有一個WCF它運行成功,當我運行它我的本地主機。但是,在針對特定域名地址(www.esimsol.com)運行時,我會遇到問題。任何一個幫助我如何配置它(「http://www.esimsol.com/evalservicesite/eval.svc」)。我的本地主機配置文件是:IIS 7.0中的WCF服務主機

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <system.web> 
    <compilation debug="true" /> 
    </system.web> 
    <!-- When deploying the service library project, the content of the config file must be added to the host's 
    app.config file. System.Configuration does not support config files for libraries. --> 
    <system.serviceModel> 
    <services> 
     <service behaviorConfiguration="EvalServiceLibrary.Service1Behavior" 
     name="EvalServiceLibrary.EvalService"> 
     <endpoint address="" binding="wsHttpBinding" contract="EvalServiceLibrary.IEvalService"> 
      <identity> 
      <dns value="localhost" /> 
      </identity> 
     </endpoint> 
     <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
     <host> 
      <baseAddresses> 
      <add baseAddress="http://localhost:8081/EvalServiceLibrary/EvalService/" /> 
      </baseAddresses> 
     </host> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
     <behavior name="EvalServiceLibrary.Service1Behavior"> 
      <!-- To avoid disclosing metadata information, 
      set the value below to false and remove the metadata endpoint above before deployment --> 
      <serviceMetadata httpGetEnabled="True"/> 
      <!-- To receive exception details in faults for debugging purposes, 
      set the value below to true. Set to false before deployment 
      to avoid disclosing exception information --> 
      <serviceDebug includeExceptionDetailInFaults="False" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 
</configuration> 

注:特別基址

回答

0

刪除

<identity> 
     <dns value="localhost" /> 
    </identity> 

&

<host> 
     <baseAddresses> 
     <add baseAddress="http://localhost:8081/EvalServiceLibrary/EvalService/" /> 
     </baseAddresses> 
    </host> 
0

你有你的解決方案與名http://www.esimsol.com發佈到IIS服務器。 發佈之後嘗試與地址上運行的服務:http://www.esimsol.com/evalservicesite/eval.svc 和改變你的基地編輯部地址到

你不能使用你的服務器loacalhost 8081發佈到後無論是它應該是localhost任何服務器或網站名稱http://www.esimsol.com

+0

用www.esimsol.com替換基地址我在IIS中託管我的服務。但是,當我嘗試調用我的服務時,我收到以下消息:沒有端點在http://win-ea8mlbabe9t/evalservicesite/eval.svc中偵聽可以接受消息。這通常是由不正確的地址或SOAP操作引起的。有關更多詳細信息,請參閱InnerException(如果存在)。 –

+0

老兄你必須在IIS中使用這個名稱http://www.esimsol.com.once主持/發佈本網站,它已成功發佈,那麼只有這將是一個有效的地址。 – lovin

+0

它的發佈成功,但我得到相同的消息 –