title: Error while copying file on remote server with server path
body: <p>I am trying to copy upload files to remote server i get below exception.
  It takes 5 min to copy a 100kb file.</p>
  
  <pre><code>System.Threading.ThreadAbortException: Thread was being aborted.
     at Microsoft.Win32.Win32Native.CreateFile(String lpFileName, Int32 dwDesiredAccess, FileShare dwShareMode, SECURITY_ATTRIBUTES securityAttrs, FileMode dwCreationDisposition, Int32 dwFlagsAndAttributes, IntPtr hTemplateFile)
     at Microsoft.Win32.Win32Native.SafeCreateFile(String lpFileName, Int32 dwDesiredAccess, FileShare dwShareMode, SECURITY_ATTRIBUTES securityAttrs, FileMode dwCreationDisposition, Int32 dwFlagsAndAttributes, IntPtr hTemplateFile)
     at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
     at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
     at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
     at System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType)
     at System.Net.Mail.Attachment..ctor(String fileName)
     at AFI.WarrantyClaim.SendConfirmationMail(String sClaimID, String sRecepient, Boolean bIsCust, ArrayList alUploadedFiles)
     at AFI.WarrantyClaim.btnNext_Click(Object sender, EventArgs e) 
  </code></pre>
  
  <p>Code which is causing this issue :</p>
  
  <pre><code>For i As Integer = 0 To Request.Files.Count - 1
              Dim hpfFile As HttpPostedFile = Request.Files(i)
  
              If hpfFile.ContentLength &gt; 0 Then
                  Dim sFileExtention As String = System.IO.Path.GetExtension(hpfFile.FileName)
                  Dim sFileName As String = String.Empty
  
                  sFileName = sClaimNo + "_" + System.IO.Path.GetFileNameWithoutExtension(hpfFile.FileName) + "_" + iPhoto.ToString() + _
                              sFileExtention
  
                  Dim sScopeIdentity As String = SaveImageData(Convert.ToInt32(sClaimNo), Convert.ToString(iPhoto), sFileName)
                  hpfFile.SaveAs(ConfigurationManager.AppSettings(m_sUPLOADED_FILE_PATH) + sFileName)
  
  
                 iPhoto = iPhoto + 1
              End If
          Next
  </code></pre>