WCF服务托管和使用 [英] wcf service hosting and consuming

查看:66
本文介绍了WCF服务托管和使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有局域网连接,因为该网络wcf服务是从一台计算机上的iis托管的,我想从另一台计算机上使用该wcf服务,为此,我要提供托管在iis上的该远程计算机的ip地址.但是它显示了无法连接远程服务器的错误...您能请任何人帮助我使用该服务还是向我展示与我的问题有关的示例..
预先谢谢您...

we have lan connection,in that network wcf service is hosted on iis from one machine,and i want to consume that wcf service from another machine,for this i am giving ip address of that remote machine which is hosted at iis.but it shows an error of unable to connect remote server...could you pls anybody help me to consume that service or show me examples related my problem..
thank you in advance...

推荐答案

您是否能够从远程计算机访问浏览器中的WCF服务?

也可以尝试通过以下方式更改WCF服务的web.config中的设置.

Are you able to access your WCF service in Browser from Remote machine?

Also try by changing settings in web.config of your WCF Service as below.

<service name="MyServiceName">
behaviorConfiguration="MyServiceBehavior"></service>


<servicebehaviors>
        
    <behavior name="MyServiceBehavior">
               <servicemetadata httpgetenabled="true" />
    </behavior>
        
</servicebehaviors>


这篇关于WCF服务托管和使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆