You cannot construct an HttpWebRequest with a local file. However, you can
construct a WebRequest, which is actually a FileWebRequest.
WebRequest wr = WebRequest.Create(file:///c:/a.txt);
MessageBox.Show(wr.GetType().ToString());
This will throw up a messagebox that shows "System.Net.FileWebRequest"
-vJ
"Drew" <so*****@hotmail.com> wrote in message
news:Op**************@tk2msftngp13.phx.gbl...
Can I construct an HttpWebRequest with a local file
instead of a URL?
It seems like I remember doing this in Java with something
like "file:\\\myfile.txt" in place of the URL.
Thanks,
Drew