title: Error connecting to Web Service in C#
body: <p>I am trying to access a web service and calling a method to pass my request parameters. I am programmatically setting my credentials, using:</p>
  
  <pre><code>service.Credentials = 
        new NetworkCredential("username", "password", "domain_url");
  </code></pre>
  
  <p>When in the above code, I pass <code>domain_url</code>, I get this Web Exception,</p>
  
  <p><code>Unable to automatically step into the server. Connecting to the server machine "ServerUrl" failed. Invalid access to memory location.</code></p>
  
  <p>When I do not pass <code>domain_url</code>:</p>
  
  <pre><code>service.Credentials = new NetworkCredential("username", "password");
  </code></pre>
  
  <p>It does not throw the Web Exception, rather it throws Soap Exception, that only says "Internal Error" with no error code.</p>
  
  <p>Why is this happening?</p>