title: Connecting to a wsdl in .net
body: <p>I am trying to connect the following service :</p>
  
  <p><a href="http://api.affiliatewindow.com/v4/AffiliateService?wsdl" rel="nofollow noreferrer">http://api.affiliatewindow.com/v4/AffiliateService?wsdl</a></p>
  
  <p>I did the following :</p>
  
  <ol>
  <li><p>Created a new empty web application (c# visual studio 2010)</p></li>
  <li><p>Right Click on the solution -> add service reference </p></li>
  <li><p>Pressed "GO"</p></li>
  <li><p>Changed the name to AffWinAPI and pressed OK</p></li>
  </ol>
  
  <p>I get the following error :
  "Failed to generate code for the service reference 'AffWinAPI'.  Please check other error and warning messages for details."</p>
  
  <p>I tried the solution suggested in the following and it still haven't worked for me.</p>
  
  <p><a href="https://stackoverflow.com/questions/3977560/service-reference-error-failed-to-generate-code-for-the-service-reference">Service Reference Error: Failed to generate code for the service reference</a></p>
  
  <p><a href="https://stackoverflow.com/questions/1872865/what-does-this-wcf-error-mean-custom-tool-warning-cannot-import-wsdlporttype">What does this WCF error mean: &quot;Custom tool warning: Cannot import wsdl:portType&quot;</a></p>
  
  <p>Any advice ?</p>