在C#中连接到Web服务时出错

时间:2010-10-19 13:15:10

标签: asp.net web-services webservice-client

我正在尝试访问Web服务并调用方法来传递我的请求参数。我正在以编程方式设置我的凭据,使用:

service.Credentials = 
      new NetworkCredential("username", "password", "domain_url");

在上面的代码中,我传递了domain_url,我得到了这个Web例外,

Unable to automatically step into the server. Connecting to the server machine "ServerUrl" failed. Invalid access to memory location.

当我没有通过domain_url时:

service.Credentials = new NetworkCredential("username", "password");

它不会抛出Web异常,而是抛出Soap Exception,只会说“内部错误”而没有错误代码。

为什么会这样?

0 个答案:

没有答案
相关问题