开发者

Error connecting to Web Service in C#

开发者 https://www.devze.com 2023-01-20 09:11 出处:网络
I am trying to access a web service and calling a method to pass my request parameters. I am programmatically setting my credentials, using:

I am trying to access a web service and calling a method to pass my request parameters. I am programmatically setting my credentials, using:

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

When in the above code, I pass domain_url, I get this Web Exception,

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

When I do not pass domain_url:

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

It does not throw the Web Exception, rather it throws Soap Exception, that only says "Internal Error" with 开发者_运维知识库no error code.

Why is this happening?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号