服务器上的Silverlight项目中调用wcf服务时出现问题 [英] problem in calling wcf service in silverlight project on server

查看:81
本文介绍了服务器上的Silverlight项目中调用wcf服务时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我正在使用wcf与silverlight进行数据库连接.
我给wcf服务的引用为:
1.右键单击Silver Light项目
2.添加服务参考
3.发现
4.it显示路径"http://localhost:3604/service1.svc"
5.go

在我的本地PC上运行正常.但是当我在IIS或Web服务器上配置它时
它不起作用,也没有给出任何错误.
(它不是在调用wcf服务)

可以请任何人向我建议解决方案/原因

hello all

i am using wcf for database connectivity with silverlight.
i am giving the reference of wcf service as :
1. right clicking on silver light project
2.add service reference
3.discover
4.it show path "http://localhost:3604/service1.svc"
5.go

it is working fine on my local PC. but when i configure it on IIS or on web server
it is not working.and also not giving any error.
(it is not calling wcf service)

can please anyone suggest me solution/reason of it

thanks in advance.

推荐答案

您的WCF服务是否也托管在Web服务器上?如果是这样,则将该引用添加到您的项目中,然后将其发布到IIS.

如果WCF服务在您的本地计算机上,并且您仅在Web服务器上托管应用程序,则请检查本地服务可在Web服务器上访问".同样在托管应用程序web.config中,为端点地址指定IP_Address而不是localhost.
Is your WCF service also hosted on web server? If so then add that reference to your project and publish it to IIS.

If WCF service is on your local machine and you are hosting only your application on webserver then please check, Local service is accessible in webserver. Also in hosted application web.config for endpoint address specify IP_Address instead of localhost.


这篇关于服务器上的Silverlight项目中调用wcf服务时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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