CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    81

    Directory.Move() is destroying my session information

    I'm using vb.net in ASP.NET with the 2.0 framework.


    I'm attempting to rename a directory inside my web app's directory using the Directory.Move() function. Whenever I use this function, though, my session state is destroyed. Does anyone know what could be causing this?

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto
    Posts
    805

    Re: Directory.Move() is destroying my session information

    can you post some of the code your trying? Directory.Move on its own shouldn't kill anything in the session object.

    mcm
    rate my posts!
    mcm

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto
    Posts
    805

    Re: Directory.Move() is destroying my session information

    more info on this :

    http://www.velocityreviews.com/forum...g-session.html

    basically if your moving the pages that the app is located in (or a dir the app is in) it WILL lose state because of the fact the pages have been "touched" so the app has to re-start.

    The option detailed in the link above is less than ideal. I suggest you look at Session Persistance using SQL Server and store the session to a db before your directory.move is called. Then re-load it based on something like a hidden field or a key in the querystring

    hth,
    mcm
    rate my posts!
    mcm

  4. #4
    Join Date
    Aug 2004
    Posts
    81

    Re: Directory.Move() is destroying my session information

    Alright thanks for the info!

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

Featured