Search

System.IO.Directory.Delete clears Page Session ! by Cláudio Teixeira

Closed
as By Design Help for as By Design

2
0
Sign in
to vote
Type: Bug
ID: 102228
Opened: 12/13/2004 5:12:49 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
When deleting a server folder, the Session information is lost in the next reload...

I've included an attach that is a simple webform with 3 buttons a textBox and a label.
the textbox is used to name a certain folder.
The create button creates it, and the delete button deletes it. The reload is used to display a count of session variables in use. The session has one variable initialized in the create event.
Details (expand)
Product Language
English
Version
Visual Studio 2005 Beta 1
Category
Controls
Operating System
Windows XP Professional
Operating System Language
US English
Steps to Reproduce
To reproduce, copy this project, install it and create a "tmp" folder in the root of the application with write permissions for the aspnet account used to run the application. Then, try this:

type a name in the textbox, press create and check if the folder was in fact created. hit reload. You should now see a "1" . Then hit reload again (just to check :) ). Then hit delete, check if it was in fact deleted, and hit reload. You should still see a "1". Now hit reload again. Magically, the "1" is now a "0", indicating that the session variable has been cleared...
Actual Results
Magically, the "1" is now a "0", indicating that the session variable has been cleared...
Expected Results
The session variable should remain intact...
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 1/19/2005 at 4:23 PM
Deleting a folder in the root of an application restarts the app, and assuming you're using InProc mode, restarting the app will cause session state to go away.

Please see this two FAQs for more info:
http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=232621
http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=7504
Posted by Microsoft on 1/10/2005 at 11:43 AM
Thank you for submitting this to us. We will investigate and keep you informed.

The Web Platforms and Tools Team
Sign in to post a workaround.