title: StackTrace returns nothing
body: <p>We are having a windows service, which download files from an FTP location.
  If there is an exception we are sending email</p>
  
  <p>But StackTrace returns nothing.</p>
  
  <pre><code> public void Send_Mail(string strTitle, Exception ex, string MsgSubject)
          {
  
              System.Diagnostics.StackTrace StackTrace = new System.Diagnostics.StackTrace(ex,true);
              StringBuilder msgBody = null;
              msgBody = new StringBuilder();
              msgBody.Append(ex.Message);
              try
              {
                  if (StackTrace.FrameCount &gt; 0)
                  {
                      foreach (StackFrame r in StackTrace.GetFrames())
                      {
                          msgBody.Append(String.Format("Filename: {0} Line: {1} Column: {2} Offset: {3} Method: {4} &lt;br/&gt; ",
                              r.GetFileName(), r.GetFileLineNumber(), r.GetFileColumnNumber(), r.GetILOffset(), r.GetMethod()));
                      }
                  }
              }
              catch (Exception exMail)
              {
  
              }
              finally
              {
  
              }
          }
  </code></pre>