如何从WebConfig设置WCF URL [英] How to set a WCF URL from WebConfig

查看:84
本文介绍了如何从WebConfig设置WCF URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用WCF的网站上工作。我想要做的是,每当WebService URL被更改时,我必须能够在My项目中进行更改而不必停止此操作。所以我想在我的项目的webconfig中设置一个键,并在Reference.cs中将该键值设置为URI。我将项目中的WebService Reference状态更改为dynamic。但问题是,每当我更新web服务时,uri都会更改为如下所示的文本:



global :: Drd.Properties.Settings.Default.CoreBusiness_UbossProvisioning_ProvisioningServices;

解决方案

查看这些

访问没有服务参考的WCF服务 [ ^ ]

FYI 调用没有Web引用的Web服务 [ ^ ]

I am working on a website that uses a WCF. The thing I want to do is that whenever the WebService URL is changed, i must be able to change in My project without having to stop this. So i thought of setting a key in webconfig of my project and to set that key value as URI in Reference.cs. I changed the state of WebService Reference in my project as dynamic. But the problem is that whenever I update the webservice, the uri gets changed to the text shown below :

global::Drd.Properties.Settings.Default.CoreBusiness_UbossProvisioning_ProvisioningServices;

解决方案

Check these
Access WCF Service Without Service Reference[^]
FYI Invoking a Web Service Without Web Reference[^]


这篇关于如何从WebConfig设置WCF URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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