Ask a Question related to ASP.NET General, Design and Development.
-
Ron Vecchi #1
Locking File
Hello,
I am opening a file like below:
FileStream fs =
File.Open(Server.MapPath("../Data/REFCOD.txt"),FileMode.Open,FileAccess.Writ
e,FileShare.None);
---------------------------------------------------------
I do not want anyone to access the file while it is opened.
---------------------------------------------------------
My question is:
If another request tries to open this file while it is opened will the
request wait untill it can open it and then proceed with its operation or
will an exception be generated?
I'm hopeing that it will wait untill it can open it and then will.
If not is there a way todo so with out generating an exception?
Thanks,
Ron Vecchi
Ron Vecchi Guest
-
File locking in XP
The issue i'm experiencing may be more related to XP Pro than with Illustrator itself, but it only seems to be affecting Illustrator EPS files... ... -
Win 2K3 & File Locking
Anyone aware of file locking issues specific to Perl on Windows 2003 server? -
File locking for all my needs
I thought this could be usefull to someone but before you use it bear in mind its limitations, - probably works as expected only on Linux and... -
Confused about locking a file via file.flock(File::LOCK_EX)
I am writing a ruby appl under AIX where I need to update the /etc/hosts table. I would like to make sure that during my update nobody else can... -
file locking
Hi All, There are 3 different file locking mechanisms in C: flock lockf fcntl I want to write a Ruby script, which shares files with a C... -
bruce barker #2
Re: Locking File
execption thrown
"Ron Vecchi" <vencenzo@comcast.net> wrote in message
news:OB7IeQUUDHA.2008@TK2MSFTNGP11.phx.gbl...File.Open(Server.MapPath("../Data/REFCOD.txt"),FileMode.Open,FileAccess.Writ> Hello,
>
> I am opening a file like below:
> FileStream fs =
>> e,FileShare.None);
>
> ---------------------------------------------------------
> I do not want anyone to access the file while it is opened.
> ---------------------------------------------------------
>
>
> My question is:
> If another request tries to open this file while it is opened will the
> request wait untill it can open it and then proceed with its operation or
> will an exception be generated?
>
> I'm hopeing that it will wait untill it can open it and then will.
> If not is there a way todo so with out generating an exception?
>
>
> Thanks,
> Ron Vecchi
>
>
bruce barker Guest
-
Ron Vecchi #3
Re: Locking File
Rats,
"bruce barker" <nospam_brubar@safeco.com> wrote in message
news:%23yAANlUUDHA.2420@TK2MSFTNGP10.phx.gbl...File.Open(Server.MapPath("../Data/REFCOD.txt"),FileMode.Open,FileAccess.Writ> execption thrown
>
> "Ron Vecchi" <vencenzo@comcast.net> wrote in message
> news:OB7IeQUUDHA.2008@TK2MSFTNGP11.phx.gbl...>> > Hello,
> >
> > I am opening a file like below:
> > FileStream fs =
> >or> > e,FileShare.None);
> >
> > ---------------------------------------------------------
> > I do not want anyone to access the file while it is opened.
> > ---------------------------------------------------------
> >
> >
> > My question is:
> > If another request tries to open this file while it is opened will the
> > request wait untill it can open it and then proceed with its operation>> > will an exception be generated?
> >
> > I'm hopeing that it will wait untill it can open it and then will.
> > If not is there a way todo so with out generating an exception?
> >
> >
> > Thanks,
> > Ron Vecchi
> >
> >
>
Ron Vecchi Guest



Reply With Quote

