I'm using this kind of code to remove file after system reboot.
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern bool MoveFileEx(string lpExistingFileName,string pNewFileName, MoveFileFlags dwFlags);
Everything is ok with native iis-imitator in VS. But when I'm using IIS this piece of code fails without any error message.
I can suggest that this is a problem with permissions on IIS. But it's only my dumb suggestion.
Can you please help me with this case?