Hey everyone
When I try to open a file i get the Exception listed below. The weird thing is it works when I run the web app locally and when i use a remote server and open a file on my computer. When someone else uses the web app and tries to open a file using the remote server the error below happens.
any help?
**Code**
C# - filepath is a valid file name which is passed via the form.
System.IO.BinaryReader br = new System.IO.BinaryReader(System.IO.File.Open(filepat h, System.IO.FileMode.Open, System.IO.FileAccess.Read));
br.BaseStream.Position=0;
**Error***
Exception Details: System.IO.FileNotFoundException: Could not find file "C:\t.txt".
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[FileNotFoundException: Could not find file "C:\t.txt".]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +181
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +888
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +45
System.IO.File.Open(String path, FileMode mode, FileAccess access) +36