I doing some steps, and after it my application restart automatically. How does it possible?
Please, could anyone advice something for debug that staff and understand – what is the reason of such a strange behaviour.
The are no exception, logs are clear. Application use autofac for DI. Please feel free to ask me any additional question. It’s extremely important for me to solve that issue. thanks a lot.
UPD: problem caused by this method. If I delete it – all works fine.
public void DeleteUserPreviewDir()
{
string path = GetUserPreviewDir();
Action<string> del = null;
del = s => {
string[] files = Directory.GetFiles(s);
string[] dirs = Directory.GetDirectories(s);
foreach (string file in files)
{
File.SetAttributes(file, FileAttributes.Normal);
File.Delete(file);
}
foreach (string dir in dirs)
{
del(dir);
}
Directory.Delete(s, false);
};
del(path);
}
But UserPreviewDir placed under root web folder, not in bin folder. File structure is the following: root\tempfiles\folder_which_delete
Bin dir placed in root\bin
Reason of such behavior is that i’m delete site subfolder. Why application recycle – this is still unknown.