views:

33

answers:

0

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?