FileExplorer can't show my files with WebApp

3 posts, 1 answers
  1. Israel
    Israel avatar
    2 posts
    Member since:
    Jan 2012

    Posted 19 Jan 2012 Link to this post

    Hi!

    I'm implementing the DBFileBrowserContentProvider class to access to a Sql Server data base. It works fine if I use a web site but if I use a web application when I try to show the file the handler doesn't work. Does anybody have an idea about what I'm doing wrong?

    The example I'm following is the next

    http://www.telerik.com/community/code-library/aspnet-ajax/file-explorer/connect-radfileexplorer-or-radeditor-to-a-sql-databse.aspx

    This example uses a web site but when I try to do the same in a web application, the hanlder file is never invoked and the file is never shown

    Thanks in advance
  2. Answer
    Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 24 Jan 2012 Link to this post

    Hi Israel,

    Could you please make sure that the path to the handler is correctly set in the web.config file?

    If the path is correct, could you please try to change the DBContentProvider's constructor to the following and see if the problem still exists:
    public DBContentProvider(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl, string selectedItemTag)
        :
        base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)
    {
        _itemHandlerPath = ConfigurationManager.AppSettings["Telerik.WebControls.EditorExamples.ItemHandler"];
        if (_itemHandlerPath.StartsWith("~/"))
        {
            _itemHandlerPath = (context.CurrentHandler as Page).ResolveUrl(_itemHandlerPath);
        }
    }


    Kind regards,
    Dobromir
    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
  4. Israel
    Israel avatar
    2 posts
    Member since:
    Jan 2012

    Posted 24 Jan 2012 Link to this post

    Hi Dobromir

    Thanks
    for the help! The file path was correct, I just had to change the constructor and everything works fine

    Best Regards
Back to Top