I have hosted my asp.net web app in IIS.7 and I tried some sample code to upload the image from client machine to server using httpwebrequest post. But it could not be helped.
I have an issue accessing local machine path via browser. I know for security reason browser does not allow it to read local machine path. So how could i access without using fileuplaod control and input-file type, Is there any way to get client machine path programmatically?
my requirement is : user should not allow to select the file path. So in the code behind i want to read the particular directory image file and set value on FileStream.
Ex:like
string uploadfile = @"D:\Test.jpg";
FileStream fileStream = new FileStream(uploadfile,FileMode.Open, FileAccess.Read);
When i give path like @"D:\Test.jpg it will looking into server machine path.
I tried same Example: C# HttpWebRequest form upload
Thanks for advance