Results 1 to 5 of 5

Thread: Directory.Delete causes lost of Session

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    97

    Directory.Delete causes lost of Session

    Hey,

    There is a issue where sessions are lost when using the directory.delete() method, I have done some browsing and cannot find a solution to keep the session objects alive. Basically I have a session object which is my username and password object. Has anyone found a solution for this?????



    Regards

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Directory.Delete causes lost of Session

    Are you deleting a directory within the same folder which contains your application?

    Because IIS monitors application folders for changes to files and folders. It's likely that you deleting a folder under the application folder is causing the application pool to be restarted, thus resulting in session loss.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    97

    Re: Directory.Delete causes lost of Session

    Yes, I have read about this, yes it'z stored under "my websites main directory\others\deleted folder here". Is there a way around this or is it unavoidable???

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2007
    Posts
    97

    Re: Directory.Delete causes lost of Session

    Someone please help, it's for my assignment at tech!!!!

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Directory.Delete causes lost of Session

    There isn't a way around this. Deleting a directory is not a common task in general web applications. As a result, you will need to think of a workaround.

    You could store the directories external to the web app directory. You could just not delete the directory but mark it as deleted by adding some sort of an entry in a database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width