S
Shahid
Hello,
I am having a problem with users uploading a file. Basically the way my
application works is that a user will select a file from the system
(csv) and I will take that file and do some processes on it. I am not
saving the file or making any changes to it.
Once I try to parse the file, I get the following error:
Exception Details: System.IO.FileNotFoundException: Could not find file
"C:\WINDOWS\system32\file.CSV".
notice that the path given is C:\windows\system32. but i had selected
file.csv (which exists) from another directory (c:\file.csv).
The place where it crashes on the code is:
using(StreamReader sr = new StreamReader
(inputFile.PostedFile.FileName)
{
string line = null;
int ln = 0;
while((line = sr.ReadLine()) != null)
{
string[] fileFields = splitRx.Split(line);
ln++;
fields.Add(fileFields); //Save all the data for later
}
}
Thank you in advance for your help
Shahid
I am having a problem with users uploading a file. Basically the way my
application works is that a user will select a file from the system
(csv) and I will take that file and do some processes on it. I am not
saving the file or making any changes to it.
Once I try to parse the file, I get the following error:
Exception Details: System.IO.FileNotFoundException: Could not find file
"C:\WINDOWS\system32\file.CSV".
notice that the path given is C:\windows\system32. but i had selected
file.csv (which exists) from another directory (c:\file.csv).
The place where it crashes on the code is:
using(StreamReader sr = new StreamReader
(inputFile.PostedFile.FileName)
{
string line = null;
int ln = 0;
while((line = sr.ReadLine()) != null)
{
string[] fileFields = splitRx.Split(line);
ln++;
fields.Add(fileFields); //Save all the data for later
}
}
Thank you in advance for your help
Shahid