title: Input string was not in a correct format
body: <p>I have two web service functions which have the exact same interface (calling from C#/Winform application):</p>
  
  <p><code>string[] f1(int, string[])</code> and <code>string[] f2(int, string[])</code></p>
  
  <p>to which I'm sending the exact same data. When I call f1, it works just fine and returns a string[], however, when I call f2, I get a SOAPException saying that the "input string is not a correct format". </p>
  
  <p>What could be causing one to work and the other not to work?</p>
  
  <pre><code>    private void backgroundWorkerUploadNew_DoWork(object sender, DoWorkEventArgs e)
      {
          List&lt;String&gt; submittedList = new List&lt;String&gt;();
          StreamReader reader = new StreamReader(this.textBoxFilename.Text);
          String data;
  
          while ((data = reader.ReadLine()) != null)
          {
              submittedList.Add(data);
          }
          reader.Close();
          // Send array of handset names to service
          int channelId = 0;
          string[] listToSubmit = submittedList.ToArray();
          channelId = AppStatus.CurrentChannel.ChannelID;
          String[] newHandsetsList = service.Function2(channelId, listToSubmit);
          ...
      }
  </code></pre>
  
  <p>The web service method</p>
  
  <pre><code>public List&lt;String&gt; Function2(int integer, List&lt;String&gt; strings)
  {
      List&lt;String&gt; newList = new List&lt;string&gt;();
      DataTable tempDt = null;
      foreach (String s in strings)
      {
          String q = @"** SOME QUERY **";
          tempDt = Database.RunSql(q);
          ...
      }
      return newList;
  }
  </code></pre>