Re: File in use, Catch/Try a number of times
- From: "LVP" <lvp_agentman@xxxxxxxxxxx>
- Date: Fri, 11 Jan 2008 07:34:53 -0800
Do you have to worry about backup issues after midnight?
"Mark Rae [MVP]" <mark@xxxxxxxxxxxxxxxxx> wrote in message
news:OLjuhCGVIHA.1208@xxxxxxxxxxxxxxxxxxxxxxx
"Larry Bud" <larrybud2002@xxxxxxxxx> wrote in message
news:de404a49-866e-4b4e-bb36-ad8a311e72e4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
How would you recommend this interaction to occur so the web service
doesn't step on the toes of the processing app and vice versa?
Firstly, the absolute last thing I'd do is have a text file on a web
server which can potentially be locked by more than one user - seems like
a disaster waiting to happen...
Instead, every time a client does an upload, I'd create a separate file
with a dynamically created filename - I'd almost certainly construct the
filename based on a combination of the client's unique identifier and a
timestamp e.g. 123-20080111144130.xml or 20080111144130-123.xml. That way
you wouldn't need to worry about file locking or overwriting...
Then I'd set my processing app to run at just after midnight, and design
it so that it polled the folder containing the XML file(s), inspecting the
filename so that it processed only the files where the timetamp portion of
the filename was earlier than the current day, deleting / renaming them
after successful processing...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
.
- References:
- File in use, Catch/Try a number of times
- From: Larry Bud
- Re: File in use, Catch/Try a number of times
- From: Mark Rae [MVP]
- File in use, Catch/Try a number of times
- Prev by Date: Re: Browse Server Directory for Download File
- Next by Date: Re: IIS bug-Concurrent request lock before IHttpModule.AcquireRequ
- Previous by thread: Re: File in use, Catch/Try a number of times
- Next by thread: Re: File in use, Catch/Try a number of times
- Index(es):
Relevant Pages
|