title: SaveAs method is configured to require a rooted path -- help understanding existing code block
body: <p>I have written a function to upload data from an excel spreadsheet to a form.  Testing from my computer was successful.  I migrated my vb.net code to the dev server and now I'm getting a rooted path message. </p>
  
  <p>My code works with existing code written by someone else.  I don't quite understand exactly what it is doing because there's no comments and I'm new to programming.</p>
  
  <p>My thought is the first section of code is looking for the path of the file being submitted by the user (the IF section) and the second section of code (in the ELSE section) is -- not really sure actually as the code seems redundant.  I do know we have a temp folder on the server.  It would be helpful to understand what the code is doing so I can figure out where to put the server path.  Can someone comment on the code to help me understand? </p>
  
  <pre><code>If WebPath.Contains("localhost") Then
      FilePath = Path.Combine("c:\open", FileName)
      FileUpload1.SaveAs(FilePath)
  Else
      Dim FolderPath As String = ConfigurationManager.AppSettings("FolderPath")
      FilePath = FolderPath &amp; FileName
      FileUpload1.SaveAs(FilePath)
  End If
  </code></pre>