title: Connect to the Magento API using C#
body: <p>Im trying to connect to the Magento 1.4.0.1 API, but until now I have no luck.</p>
  
  <p>I have added a <code>Service Reference</code> named <code>MagentoAPI</code> and pointed it to <code>http://mydomain.com/api/v2_soap?wsdl=1</code> (I know the <code>=1</code> is not intended, but it dont work without)</p>
  
  <p>This works fine, I get a list of all available methods, but when I try to use any of them it dont work.</p>
  
  <pre><code>using Magento_Import.MagentoAPI;
  
  namespace Magento_Import
  {
      public partial class _Default : System.Web.UI.Page
      {
          Mage_Api_Model_Server_V2_HandlerPortType handler;
  
          protected void Page_Load(object sender, EventArgs e)
          {
              string session = handler.login("username", "password");
          }
      }
  }
  </code></pre>
  
  <p>That is how I initialize the web service, but when I debug the code the <code>handler</code> is <code>null</code>.</p>
  
  <p>What am I doing wrong?</p>