tags:

views:

55

answers:

1

im not able to delete the file programmatically in asp.net.No Error is coming. But even then file is not getting deleted. its very urgent.....

A: 

By default ASP.Net runs apps under the ASPNET account - has that account been given sufficient file permissions to delete the file?

Will
wat code i should use to delete the file. have u got any idea.. i need to implement ASAP
jvdedhe
I just quickly read the MS documentation for File.Delete (http://msdn.microsoft.com/en-us/library/system.io.file.delete.aspx) and it says that the only time it doesn't give an error is when the file doesn't exist.Forget what I said about permissions, you'd be getting an UnauthorizedAccessException if that was the case.Are you absolutely sure the path in "fi" is correct??
Will
fi is a name of the file..thanks in advance.
jvdedhe
My Recquirement is like if by mistakenly the user might have uploaded the file and the user will delete the file and again he will upload a new file.
jvdedhe