读书人

批改Web.config 内Web服务endpoint ad

发布时间: 2014-01-21 00:35:39 作者: rapoo

修改Web.config 内Web服务endpoint address没有效果
本帖最后由 xvting 于 2014-01-17 21:33:28 编辑 Asp.net开发时添加了开发用Web服务,在Web.config 的system.serviceModel下有自动生成的配置endpoint address。

部署时修改Web.config 内配置为生产环境的Web服务地址,但是系统运行还是调用开发用Web服务地址。

why?


[解决办法]
你布署时要布署两个服务,一个是wcf服务,另一个是客户端服务(webClient)。

你应该修改客户端服务访问的IP,也就是webClient里面同样有一个web.config文件,连接到wcf的IP,要改IP才有效。

下面是客端的web.config文件,修改IP,考:


<client>
<endpoint address="http://192.168.0.100/HOHCS.WCFService/AuthenticationService.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IAuthenticationService"
contract="AuthenticationSrvRef.IAuthenticationService" name="WSHttpBinding_IAuthenticationService">
<identity>
<dns value="
 " />
</identity>
</endpoint>
</client>

读书人网 >asp.net

热点推荐