2012-06-04 137 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

它的发布成功,但我得到相同的消息 –