Click here to Skip to main content
       

.NET Framework

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
Questiona question about how .NET apps dealing with filesystem failingmemberalexyxj15 Jan '13 - 22:07 
can anyone help explain what might happen to a .NET application if file system crash? Simply put, should the apps pop up warning/error reminding that file system is carshed? How does your apps deal with file system crash?
 
Please help answer, many thanks.....
AnswerRe: a question about how .NET apps dealing with filesystem failingmvpRichard MacCutchan15 Jan '13 - 22:40 
What do you mean by "file system crash", and how do you think the app could recognise it?
One of these days I'm going to think of a really clever signature.

GeneralRe: a question about how .NET apps dealing with filesystem failingmemberalexyxj15 Jan '13 - 22:49 
for example, a designated folder got changed, not able to write into it, the system shall pop up error message, right? so I have to make specific error exception/message for this kind of case, otherwise the system just gave general error message, am I right?
GeneralRe: a question about how .NET apps dealing with filesystem failingmvpRichard MacCutchan15 Jan '13 - 23:33 
You would need to implement FileSystemWatcher, take a look at these links[^].
One of these days I'm going to think of a really clever signature.

GeneralRe: a question about how .NET apps dealing with filesystem failingprotectorPete O'Hanlon15 Jan '13 - 23:46 
As the inability to save to a certain location is a predictable exception (e.g. the user attempts to save into the Windows folder on Windows 7 when running with normal permissions), it's always a good idea to protect against this type of exception.

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos

CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

AnswerRe: a question about how .NET apps dealing with filesystem failingmemberjschell16 Jan '13 - 9:00 
alexyxj wrote:
can anyone help explain what might happen to a .NET application if file system
crash?

 
In general - no.
 
alexyxj wrote:
How does your apps deal with file system crash?

 
Whatever the business requirements suggest and reasonable extrapolation from that.
 
For example I don't try to do anything at all about the file system filling up for a server. Can it happen? Yes. If it does what can I do? Nothing. I do however expect that any reasonable operations setup would take into account file system monitoring.
 
As another example if I can't read a configuration file that the server requires on start up then besides logging an error I can do one of the following
- Start with default values.
- Exit the server.
 
The choice depends on what was supposed to be in the configuration file that I was reading.
 
(Note that a logging solution MUST be implemented such that a logging failure does not stop the application from running.)
 
A stand alone user application should probably do something different. If it cannot read/write to the fle system then it should report that to the user.
AnswerRe: a question about how .NET apps dealing with filesystem failingmemberalexyxj16 Jan '13 - 20:29 
Thanks Richard/Pete/jschell, you guys provided very helpful knowledge, appreciate!
GeneralRe: a question about how .NET apps dealing with filesystem failingmemberkrunal38017 Jan '13 - 19:28 
:(

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 20 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid