I want to read a file in my e: drive from asp.net mvc application. When I try to access it from FileStream Class , file not found exception is thrown. Here is the code.
public byte[] GetEncFile(string path)
{
FileInfo fInfo = new FileInfo(path);
FileStream encFileStream = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader reader = new BinaryReader(encFileStream);
byte[] encFileBytes = reader.ReadBytes((int)fInfo.Length);
return encFileBytes;
}