title: How to pass username and password to a web service from within an iPhone app?
body: <p>Have a look to this code snippet:-</p>
  
  <p><code>CommonService objcommonService;<br>
   NetworkCredential myCredentials = new NetworkCredential("144552", "F@mous123456");<br>
   objcommonService.Credentials = myCredentials;</code></p>
  
  <p>This is a C#.net code. In this snippet  "<code>objcommonService</code>" is a object of the webservice "<code>CommonService</code>". This webservice pre authenticates the user against its supplied credentials.In C#.NET <code>NetworkCredential</code> is a standard class of the .NET .</p>
  
  <p><strong>If I am trying to hit a webservice which requires these credentials in my iPhone app , How should I pass?</strong></p>
  
  <p>Is there any way to do it so that the user of my app will not face any difficulty like "Authentication Failed !!" when he/she uses my app.
  The webservice pre authenticates the user.And I need to pass my credentials as my app calls for the service.</p>