title: Adding a web reference in Visual Studio 2010 to point to a Sharepoint 2007 site
body: <p>I'm building a console application that can load a content type and remove the seal on it through C#.  In attempting to add a web reference to the application, I'm getting an error which is strange because I use the same web reference in another application and it works fine.  I'm pretty sure I hit this problem before and fixed it, but I cannot remember how :(</p>
  
  <p>My steps:</p>
  
  <ol>
  <li>Right-click project and click <strong>Add Service Reference...</strong></li>
  <li>Click <strong>Advanced...</strong> button</li>
  <li>Click <strong>Add Web Reference...</strong> (I receive the same error when attempting to add this as a Service Reference instead)</li>
  <li>Paste URL in text box: <a href="http://(domain)/videolibrary/_vti_bin/lists.asmx" rel="nofollow">http://(domain)/videolibrary/_vti_bin/lists.asmx</a> and press <strong>Enter</strong></li>
  <li>The box on the left side shows all my service operations, but the box to give the web reference a name and the <strong>Add Reference</strong> button are grayed-out and the following error is shown above:</li>
  </ol>
  
  <blockquote>
    <p>There was an error downloading
    'http://(domain)/videolibrary/_vti_bin/lists.asmx'.
    Unable to connect to the remote server
    No connection could be made because
    the target machine actively refused it
    127.0.0.1:80 Metadata contains a reference that cannot be resolved:
    'http://(domain)/videolibrary/_vti_bin/lists.asmx'.
    There was no endpoint listening at
    <a href="http://(domain)/videolibrary/_vti_bin/lists.asmx" rel="nofollow">http://(domain)/videolibrary/_vti_bin/lists.asmx</a>
    that could accept the message. This is
    often caused by an incorrect address
    or SOAP action. See InnerException, if
    present, for more details. Unable to
    connect to the remote server No
    connection could be made because the
    target machine actively refused it
    127.0.0.1:80 If the service is defined in the current solution, try building
    the solution and adding the service
    reference again.</p>
  </blockquote>
  
  <p>EDIT: Tried changing Target Framework from <em>.NET Framework 4 Client Profile</em> to <em>.NET Framework 3.5</em> to no avail</p>