title: Call authenticated web service in asp.net MVC
body: <p>My problem is in calling authenticated (has username and password)  web service (asmx) in ASP.NET MVC</p>
  
  <p>I did the following:</p>
  
  <ol>
  <li>I added the web service to the project by adding service reference
  to the solution</li>
  <li><p>Tried to create proxy class of the service by using <code>wsdl.exe</code> tool 
  using the following command  syntax</p>
  
  <p><code>wsdl /username:******** /password:************* /domain:********** web service url.asmx?wsdl</code></p></li>
  </ol>
  
  <p>but it gave me the following error:</p>
  
  <p>There was an error downloading <code>web service url://???.asmx?wsdl</code>.  The request failed with HTTP status <code>401: Unauthorized</code>.</p>
  
  <p>I can view the service in browser by giving username and password.</p>
  
  <p>When I search for using <code>svcutil.exe</code> to create proxy class I found that it can't be used for authenticated web service.</p>
  
  <p>I want to ask if there is another way to create proxy class , or if we can call authenticated web service  in asp.net mvc application without proxy class.</p>