title: .bat Error: 'http:' is not recognized as an internal or external command, operable program or batch file
body: <p>I've come across another dead end in trying to SET UP, let alone run, a Unit Test from an existing ASP Web Site using Visual Studio 2012/2013, but I thought this question merited a question of it's own since, although I've seen similar questions asked, everything I've tried for the past 5 hours has yielded something between 0 and Null (not literally, that would be helpful if I would get such output),</p>
  
  <p>The contents of my batch file were, following the instructions of sitepoint.com's Creating and Consuming .NET Web Services in 5 Easy Steps:</p>
  
  <pre><code>wsdl /l:CS /n:WService /out:bin/wsdlWalkthrough.cs
  http://localhost/webserv.asmx?wsdl
  </code></pre>
  
  <p>Since I'm trying to follow the steps of an article that's over a decade old, syntax and conventions may easily have changed. But hey, it was able to guide me through making a working <strong>.asmx</strong> page, so I've tried to stick with it. Anyways, when I run makeWS.bat on the Developer Command Prompt for VS2012, I get the error:</p>
  
  <blockquote>
    <p>'http:' is not recognized as an internal or external command, operable
    program, or batch file.</p>
  </blockquote>
  
  <p>In attempting to fix the problem, my makeWS.bat page currently looks like:</p>
  
  <pre><code>wsdl /l:CS /n:WService /out:bin/wsdlWalkthrough.cs
  http://localhost:20141/webserv.asmx?wsdl
  </code></pre>
  
  <p>Also, the <strong>.asmx</strong> file looks like this:</p>
  
  <pre><code>&lt;%@ WebService Language="C#" Class="GetInfo" %&gt; 
  
  using System; 
  using System.Data; 
  using System.Data.SqlClient;
  using System.Web.Services; 
  
  [WebService(Description="My Suppliers List Web Service")] 
  
  public class GetInfo : WebService  
  {
    [WebMethod(Description="My WebService",BufferResponse=true)] 
  
    public DataSet ShowSuppliers (string str)  
    { 
  
      SqlConnection dbConnection = new SqlConnection("server=(local);uid=sa;pwd=;database=Northwind;");  
  
      SqlDataAdapter objCommand = new SqlDataAdapter("select ContactName, CompanyName, City, Phone from Suppliers  where Country = '" + str + "' order by ContactName asc", dbConnection); 
  
      DataSet DS = new DataSet();
      objCommand.Fill(DS);
      return DS;
      dbConnection.Close();
      dbConnection = null; 
  
    } 
  }
  </code></pre>
  
  <p>When I run the ASMX page in Firefox from File Explorer, I got the error:</p>
  
  <blockquote>
    <p>XML Parsing Error: not well-formed</p>
  </blockquote>
  
  <p>However, running the <strong>.asmx</strong> page from VS2013 got everything to work smoothly. I thought maybe the localhost port might have played a factor, so I tried adjusting my batch file:</p>
  
  <pre><code>wsdl /l:CS /n:WService /out:bin/wsdlWalkthrough.cs
  http://localhost:20141/webserv.asmx?wsdl
  </code></pre>
  
  <p>I tried turning <strong>Autorun</strong> off, I've added the http addresses as <strong>System Variables</strong>, but nothing has worked. Is anyone out there able to identify my issues because I was honestly incredulous when my <strong>Developer Command Prompt for VS2012</strong> said it didn't recognize <strong>http:</strong>. Isn't <strong>Hyper Text Transfer Protocol</strong> integrated at the architectural level by now?</p>
  
  <p><strong><em>UPDATE</em></strong></p>
  
  <blockquote>
    <blockquote>
      <p>'http:' is not recognized as an internal or external command, operable program, or batch file.</p>
    </blockquote>
    
    <p>is because the url is on a different line than the
    <a href="https://msdn.microsoft.com/en-us/library/7h3ystb6(v=vs.100).aspx" rel="nofollow">wsdl(.exe)</a>
    command (whose argument it should be), and the batch consists (this is
    a simplified view) of a series of commands each on a different line.
    In order to get over this, merge the 2 lines into 1:</p>
  
  <pre><code>wsdl /l:CS /n:WService /out:bin/wsdlWalkthrough.cs http://localhost:20141/webserv.asmx?wsdl
  </code></pre>
    
    <p>or escape the <em>eoln</em> (<code>\r\n</code>) char by <strong>^</strong>(caret):</p>
  
  <pre><code>wsdl /l:CS /n:WService /out:bin/wsdlWalkthrough.cs ^
  http://localhost:20141/webserv.asmx?wsdl
  </code></pre>
    
    <p>and if everything is OK, you should have your <em>bin/wsdlWalkthrough.cs</em>
    file generated.</p>
  </blockquote>
  
  <p>CristiFati's instructions got me past the initial hurdle. Now the new error is:</p>
  
  <blockquote>
    <p>Error: There was an error processing
    'http: //localhost/webserv.asmx?wsdl'.
    -There was an error downloading 'http: //localhost/webserv.asmx?wsdl'.
    -The request failed with HTTP status 404: Not Found.</p>
  </blockquote>
  
  <p>This seems like something I could probably find the answer to myself, but further help would still be very much appreciated.</p>