无效的URI:无法使用Web引用确定URI的格式

时间:2016-01-19 20:14:31

标签: vb.net web-services wsdl

任何帮助表示赞赏。

错误消息显示为:

  

System.UriFormatException:无效的URI:无法确定URI的格式。在System.Uri.CreateThis(String uri,Boolean dontEscape,UriKind uriKind)的System.Uri..ctor(String uriString),位于WebApplication1.Chase.pconWSService的System.Web.Services.Protocols.WebClientProtocol.set_Url(String value)。位于\ Visual Studio 2008 \ Projects \ WebApplication1 \ WebApplication1 \ Web References \ Chase \ Reference.vb中的set_Url(String Value):位于\ Visual Studio 2008 \ Projects \ WebApplication1 \ WebApplication1中的WebApplication1.Chase.pconWSService..ctor()的第102行\ Web References \ Chase \ Reference.vb:第83行

但这是指网络参考(wsdl)吗?为什么有两个不同的位置?

wsdl由供应商提供给我,无论如何这里是我的代码,它很简短:

Protected Sub transfer()
Try        
    Dim objXMLHTTP As New MSXML2.ServerXMLHTTP60()
    Dim service As New Chase.pconWSService ' The error is thrown here

1 个答案:

答案 0 :(得分:0)

问题是我的web配置没有指向实际的Web服务(主机),而是指向我的本地计算机。一旦我重新命名,那就完成了。