Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 从Localhost dev到prod server的具有WCF服务的WPF客户端?_C#_Wpf_Web Services_Wcf_Mvvm - Fatal编程技术网

C# 从Localhost dev到prod server的具有WCF服务的WPF客户端?

C# 从Localhost dev到prod server的具有WCF服务的WPF客户端?,c#,wpf,web-services,wcf,mvvm,C#,Wpf,Web Services,Wcf,Mvvm,我刚刚开始学习WCF。我已成功使用主机控制台应用程序设置WCF服务。该服务映射到具有实体框架的SQL Server。然后我有一个WPF客户端应用程序,它使用该服务。这一切都可以在Dev中正常工作,无论是从我的机器上运行的服务还是客户端应用程序: <endpoint address="http://localhost:8081/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRegimesSer

我刚刚开始学习WCF。我已成功使用主机控制台应用程序设置WCF服务。该服务映射到具有实体框架的SQL Server。然后我有一个WPF客户端应用程序,它使用该服务。这一切都可以在Dev中正常工作,无论是从我的机器上运行的服务还是客户端应用程序:

<endpoint address="http://localhost:8081/" binding="basicHttpBinding"
    bindingConfiguration="BasicHttpBinding_IRegimesService" contract="RegimesService.IRegimesService"
    name="BasicHttpBinding_IRegimesService" />    

您需要确保服务器能够解析完整的域名


另外,客户端配置代码段
中提供的地址url有问题吗?谢谢@Seymour,添加服务引用向导现在接受地址和搜索,但不返回服务,尽管服务在服务器上运行,但会出现超时异常。您可能希望启用WCF跟踪并查看日志。。
  <services>
   <service name="diiRegimesService.RegimesService">
    <endpoint address="" binding="basicHttpBinding" contract="diiRegimesService.IRegimesService"/>
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8082" />
      </baseAddresses>
    </host>
  </service>
</services>
<client>
  <endpoint address="http://emea-myserver01.emea.basketballinfo.com/localhost:8082/" binding="basicHttpBinding"
    bindingConfiguration="BasicHttpBinding_IRegimesService" contract="RegimesService.IRegimesService"
    name="BasicHttpBinding_IRegimesService" />
</client>
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'http://emea-myserver01.emea.basketballinfo.com/'.