Re: .net remoting server can't read file it should have access to read.
- From: ceh <cehupper@xxxxxxxxx>
- Date: Fri, 16 Nov 2007 09:02:33 -0800 (PST)
I got this working, had to remote debug to figure it out.
Not sure why it failed.
The original method for reading the file was this.
TextReader tr = new StreamReader(new FileStream(file, FileMode.Open));
It is now this.
TextReader tr = new StreamReader(file);
Any idea why the first throws the exception?
I see in the .net docs for FileStream
"The constructor is given read/write access to the file, and it is
opened sharing Read access (that is, requests to open the file for
writing by this or another process will fail until the FileStream
object has been closed, but read attempts will succeed). The buffer
size is set to the default size of 4096 bytes (4 KB)."
Not sure why it states "constructor is given read/write" when I say
only open.
But that is probably the issue.
.
- References:
- Prev by Date: .net remoting server can't read file it should have access to read.
- Next by Date: ContextBoundObject and [Synchronization]: what calls are from another context?
- Previous by thread: .net remoting server can't read file it should have access to read.
- Next by thread: ContextBoundObject and [Synchronization]: what calls are from another context?
- Index(es):