Lea*_*hen 7 asp.net visual-studio-2005
我正在从ASP.NET应用程序中删除一个目录.删除很顺利,但是当我从中返回时,删除前的所有会话数据都将丢失.
我使用是否无关紧要:
if (Directory.Exists(folderPath))
Directory.Delete(folderPath, true);
Run Code Online (Sandbox Code Playgroud)
要么:
System.IO.DirectoryInfo d = new System.IO.DirectoryInfo(folderPath);
if (d.Exists)
d.Delete(true);
Run Code Online (Sandbox Code Playgroud)
在这两种情况下,我都会丢失会话数据.
有没有人遇到这个问题?