Web服务常见问题

1. 资源无法找到 ,用58225端口发布服务的时候,没法找到

那么就换一个端口试试。http://localhost:58272/

 

2. could not load file or assembly MySQL.data version=5.1.5.0

     找到相关版本的dll拷贝至相应目录即可。如果有需要的,可以发邮件至shuimulinlang@gmail.com 

 

3. 用户代码未处理CommunicationException (Cross-Domain跨越问题)

An error occurred while trying to make a request to URI 'http://localhost:58272/PowerDataAccessService.asmx'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

网上的很多解决方法总结起来可以参见http://www.cnblogs.com/LeimOO/archive/2010/12/02/1894626.html。但我就是搞不定。折腾了三四天,经高人指点,才得以解决。

     但其实是端口的问题,比如我若是将http://localhost:58272/clientaccesspolicy.xml 就会提示找不到(58272是我发布服务的端口号)

 

        这个所谓的端口号58272,更像是指代了工程DataService的目录。注意红色的地方,你就会发现,系统在D:\Desktop\RHMana\DataService下找不到文件clientaccesspolicy.xml,这就是问题的关键所在。所以你只需要将clientaccesspolicy.xml和Crossdomain.xml拷贝至服务所在的目录下,就可以将跨越问题解决了。

转载于:https://www.cnblogs.com/dowtowne/p/3369834.html

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值