This is a migrated thread and some comments may be shown as answers.

FileExplorer private page

1 Answer 62 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Pau
Top achievements
Rank 1
Pau asked on 02 Aug 2012, 11:34 AM

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;
        }




1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 07 Aug 2012, 08:37 AM
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.
Tags
FileExplorer
Asked by
Pau
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or