title: how to upload a file to url
body: <p>I'm trying to upload a file from browser and copy it to a URL folder</p>
  
  <p>using c sharp.</p>
  
  <p>( i have all the Permissions to this folder)</p>
  
  <p>i have no problam upload the file to my hard drive</p>
  
  <p>like this:</p>
  
  <pre><code>HttpPostedFileBase myfile;
  
  var path = Path.Combine(Server.MapPath("~/txt"), fileName);
  
  myfile.SaveAs(path);
  </code></pre>
  
  <p>i have try to upload it to URL like this but i am getting an exception</p>
  
  <pre><code>HttpPostedFileBase myfile;
  
  var path =VirtualPathUtility.ToAbsolute("http://localhost:8080/game/images/"+fileName);
  
  myfile.SaveAs(path);
  </code></pre>
  
  <p>the Exception:</p>
  
  <pre><code>System.ArgumentException: The relative virtual path 'http:/localhost:8080/game/images/ a baby bottle. Jpg' is not allowed here.
      In - System.Web.VirtualPath.Create (String virtualPath, VirtualPathOptions 
  </code></pre>