无法使用目标计算机运行WCF服务应用程序,主动拒绝127.0.0.1:24345

时间:2014-10-13 02:43:31

标签: .net wpf wcf iis-6

我有一个带有WCF服务应用程序项目的visual studio 2010解决方案。 WPF中的第二个客户端项目使用WCF服务应用程序。在调试器中运行时, all似乎都能正常工作。

使用顶部菜单栏中的ClickOnce,然后将启动项目WPF客户端发布到// localhost / deploy并运行setup.exe。一切似乎都安装好了,开始菜单会用程序名更新。

然而,当执行WPF程序时,我得到:

" System.Net.WebException System.Net.Sockets.SocketException:无法建立连接,因为目标计算机活动拒绝了它127.0.0.1:24345" ;

我正在使用Windows 7并通过"打开或关闭Windows功能来验证"所有IIS模块都已安装。

我错过了什么?

感谢任何帮助。

以下是Web.config文件:

<?xml version="1.0"?>

<system.web>
 <compilation debug="true" targetFramework="4.0" />
</system.web>

<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior>
      <serviceMetadata httpGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="true"/>
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>

<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

</configuration>

app.config:

 <?xml version="1.0"?>
 <configuration>

 <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>


 <system.serviceModel>
  <bindings>
   <basicHttpBinding>
     <binding name="BasicHttpBinding_INovaDataService" />
    </basicHttpBinding>
   </bindings>
  <client>
   <endpoint address="http://localhost:24324/DataService.svc" binding="basicHttpBinding"
    bindingConfiguration="BasicHttpBinding_INovaDataService" contract="DataService.INovaDataService"
    name="BasicHttpBinding_INovaDataService" />
    </client>
  </system.serviceModel>
</configuration>

0 个答案:

没有答案