title: InputStream from a local file VB.net
body: <p>I'm trying to upload a file to a web with an API service but I can't pass a local file to <code>InputStream</code>.</p>
  
  <p>How can I do it? I use a <code>FileWebRequest</code> but doesn't work.</p>
  
  <pre><code>Dim uri As New Uri("C:/Captura.PNG")
  Dim myFileWebRequest As FileWebRequest = WebRequest.Create(uri)
  Dim myFileWebResponse As FileWebResponse = myFileWebRequest.GetResponse()
  Dim receiveStream As Stream = myFileWebResponse.GetResponseStream()
  </code></pre>