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

FileExplorer can't show my files with WebApp

2 Answers 54 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Israel
Top achievements
Rank 1
Israel asked on 19 Jan 2012, 09:32 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Dobromir
Telerik team
answered on 24 Jan 2012, 12:34 PM
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
0
Israel
Top achievements
Rank 1
answered on 24 Jan 2012, 06:06 PM
Hi Dobromir

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

Best Regards
Tags
FileExplorer
Asked by
Israel
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Israel
Top achievements
Rank 1
Share this question
or