I am having a problem where I am trying to delete my file but I get an exception.
if (result == \"Success\")
{
if (FileUpload.HasFile)
{
t
I had this error thrown when I tried to rename a folder very rapidly after it had been either moved or created.
A simple System.Threading.Thread.Sleep(500);
solved it:
void RenameFile(string from, string to)
{
try
{
System.IO.File.Move(from, to)
}
catch
{
System.Threading.Thread.Sleep(500);
RenameFile(from, to);
}
}