Session get expire after deleting folder

4 posts, 0 answers
  1. Amol
    Amol avatar
    57 posts
    Member since:
    Apr 2008

    Posted 28 Jul 2009 Link to this post

    Hello,

    When I delete a folder from FileExplorer control , my session variables is get expired.
    Please check my below code,

      <asp:ScriptManager ID="t" runat="server"></asp:ScriptManager> 
         
        
         
        <telerik:RadFileExplorer ID="rfeDocuments" runat="server"  
            > 
            <Configuration ViewPaths="~/Files" UploadPaths="~/Files"  
                DeletePaths="~/Files" MaxUploadFileSize="104857600" /> 
        </telerik:RadFileExplorer> 





    protected void Page_Load(object sender, EventArgs e) 
        { 
            try 
            { 
                if (!IsPostBack) 
                {               
                    Session["test"] = "tt"
                } 
                string s; 
                if (Session["test"] != null
                    s = "ok"
     
            } 
            catch (Exception ex) 
            { 
               // 
            } 
        } 


    Please help me to solve this problem.

    I am using telerik Q2 release,
    VS 2008 and framework 3.5
    tested on IE as well as FF.


    Thanks,
    Amol
  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 30 Jul 2009 Link to this post

    Hello Amol,

    I used the provided code, but i was not able to reproduce the described problem - I prepared a screencapture of my test.
    Could you please modify the my test project (attached as well) so it reproduces the problem, open a new support thread and send it back? I will debug the problem and do my best to provide a working solution for you.

    Greetings,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Patricio Munoz
    Patricio Munoz avatar
    1 posts
    Member since:
    Jul 2009

    Posted 04 Aug 2009 Link to this post

    Hi amol, this occurs when you delete file fron inside web application.
    Try to delete file from distinct location of the web site.
  5. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 05 Aug 2009 Link to this post

    Hello Patricio,

    Yes, you are right. My colleague Stoyan already investigated the problem and answered the same question in Amol's support ticket:
     
    "The issue you experienced is a feature of ASP.NET - deleting a sub-folder in the application directory will trigger a restart of the web application. If your session is stored in the application memory, it will be erased. This is not connected with the RadFileExplorer control - the same behavior will occur if you delete the folder from windows explorer. Here are some useful links on the matter:

    http://blogs.msdn.com/toddca/archive/2005/12/01/499144.aspx
    http://weblogs.asp.net/owscott/archive/2006/02/21/438678.aspx

    One possible solution we can recommend is to move your session data to a state server or a SQL server. This way it will not be lost when the AppDomain is restarted."



    Regards,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top