FileExplorer private page

2 posts, 0 answers
  1. Pau
    Pau avatar
    5 posts
    Member since:
    May 2011

    Posted 02 Aug 2012 Link to this post

    Hello, I’m trying to use the fileexplorer example published in the demos and it works but when it do a postbak the system redirects to the login page.  I use it in a private page and I use Forms authentification method with a ticket cookie.

    Thanks in advance.


    Here you can see my code but is just a copy from the demo

        <script type="text/javascript">
            //<![CDATA[
            function OnClientItemSelected(sender, args) {
                window.open(args.get_path());
            }
            function OnClientDelete(explorer, args) {
                // previewImage("");
            }

            //]]>
        </script>


    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="Server"/>
        <telerik:RadFileExplorer runat="server" ID="FileExplorer1" Width="860px" Height="520px" OnClientItemSelected="OnClientItemSelected" OnclientDelete="OnClientDelete">
            <Configuration ViewPaths="~/Otros/tmp" UploadPaths="~/Otros/tmp" DeletePaths="~/Otros/tmp" />
        </telerik:RadFileExplorer>
    </form>


    CS


    protected void Page_Load(object sender, EventArgs e)
            {
                //set properties according to configuration panel
                //FileExplorer1.Configuration.SearchPatterns = new string[] { "*.jpg", "*.jpeg", "*.gif", "*.png" };
                FileExplorer1.Configuration.SearchPatterns = new string[] { "*.*" };
                FileExplorer1.VisibleControls = GetVisibleControls();
                FileExplorer1.EnableOpenFile = false;
                FileExplorer1.DisplayUpFolderItem = true;
                FileExplorer1.EnableCreateNewFolder = true;
                FileExplorer1.Configuration.UploadPaths = new string[0];
                FileExplorer1.Configuration.UploadPaths = new string[] { "~/Otros/tmp" };
                FileExplorer1.AllowPaging = false;
            }


            protected Telerik.Web.UI.FileExplorer.FileExplorerControls GetVisibleControls()
            {
                Telerik.Web.UI.FileExplorer.FileExplorerControls explorerControls = 0;
                explorerControls |= Telerik.Web.UI.FileExplorer.FileExplorerControls.Grid;
                explorerControls |= Telerik.Web.UI.FileExplorer.FileExplorerControls.Toolbar;
                explorerControls |= Telerik.Web.UI.FileExplorer.FileExplorerControls.TreeView;
                explorerControls |= Telerik.Web.UI.FileExplorer.FileExplorerControls.ContextMenus;
                return explorerControls;
            }




  2. Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 07 Aug 2012 Link to this post

    Hi Pau,

    If I understand the scenario correctly, you are saving the user's authentication data in a cookie, but after a post back the cookie doesn't perform its work and the user turns out to be logged out. I can think of two possible reasons for such a behavior, so:

    • Could you check if the use of cookies is enabled?
    • Could you check if there is a function (method) which is deleting the set cookie on a post back?

    Let me know whether this helps. If you still experience the problem, could you please open a formal support ticket and send us a simplified runnable project with only the minimum code that is necessary to replicate the issue?

    Kind regards,
    Veselina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top