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

Can upload files via RadFileExplorer, but cannot create, delete, or rename folders or files in directory

25 Answers 904 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Jeff Adkisson
Top achievements
Rank 1
Jeff Adkisson asked on 02 Apr 2009, 07:39 PM
I am having trouble modifying files via RadFileExplorer. 

I can see my trees and I can upload files no problem. However, I cannot delete files or folders and I cannot rename files or folders. 

Whenever I try a delete or rename operation on a file, I get this popup:
The selected file could not be deleted because the application did not have enough permissions.

When I try to create a new folder, I get this popup:
The selected folder could not be created because the application did not have enough permissions.

I have granted the ASP.NET user full rights to the folders and files in question. I can see that the ASP.NET user is the owner of the files I am uploading, so that should be the right user. That didn't work, so I explicitly granted full rights to myself and Everyone just to see if that would fix it... no luck.

My environment is IIS 5 on XP SP3. My ASP.NET application is setup to use Windows authentication.

This is clearly a security issue, but I don't see what I am missing. Please advise.

Thanks - Jeff




25 Answers, 1 is accepted

Sort by
0
Shaun Peet
Top achievements
Rank 2
answered on 03 Apr 2009, 08:01 PM
Sorry for suggesting the obvious first, but are the DeletePaths set?
0
Jeff Adkisson
Top achievements
Rank 1
answered on 03 Apr 2009, 08:36 PM
Yes. They are all three set to the same value.

Thanks - Jeff
0
Shaun Peet
Top achievements
Rank 2
answered on 03 Apr 2009, 08:58 PM
Are you able to do any file manipulation outside of the RadFileExplorer?  Ie:  Create a page that opens a file within the file system, renames it, and saves it?
0
Jeff Adkisson
Top achievements
Rank 1
answered on 03 Apr 2009, 09:41 PM
Yes... I can do all of that via standard File. and Directory. commands.

I've since dropped the control and wrote my own using the tree control and the upload control. Works well... not as full featured as your control, but I'm having no issues.

I'll try it again on my next project.

Thanks - Jeff
0
Lini
Telerik team
answered on 06 Apr 2009, 11:10 AM
Hello Jeff,

The errors you saw are displayed either if the ASP.NET process fails to perform the disk operation (e.g. not enough permissions for Directory.Create()) or if the path you are trying to modify is not part of the UploadPaths/DeletePaths collections from the FileExplorer configuration. As you already said, the file system permissions have been set correctly, so this leaves the paths in the configuration.

If possible, try upgrading to the latest build (2009.1.402) or send us a sample project that shows this problem so we can investigate further.

Kind regards,
Lini
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
vikas
Top achievements
Rank 1
answered on 06 Apr 2009, 12:14 PM
Hi 

 I am facing problem to hide or disable the delete,rename option in RadFileExplorer control. I want to hide these two option.

Please help me.

Regards
vikas goel
0
Fiko
Telerik team
answered on 06 Apr 2009, 01:26 PM
Hello Vikas,

You can achieve this behavior by adding the following code in the codebehind :

 This part of the code removes the "Rename" and "Delete" menus from the grid's context menu :
RadFileExplorer1.GridContextMenu.Items.RemoveAt(1); 
RadFileExplorer1.GridContextMenu.Items.RemoveAt(1); 

This part of the code removes the "Rename" and "Delete" menus from the RadTreeView - on the left of the RadFileExplorer object.
RadFileExplorer1.TreeView.ContextMenus[0].Items.RemoveAt(0); 
RadFileExplorer1.TreeView.ContextMenus[0].Items.RemoveAt(0); 

And the following part of the code removes the "Delete" command from the RadToolBar on the top of the RadFileExplorer object :

RadFileExplorer1.ToolBar.Items.RemoveAt(5); 

I hope this helps.

Regards,
Author nickname
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Michael Dunbar
Top achievements
Rank 2
answered on 28 Apr 2009, 02:23 PM
Did this ever get solved?

I am using the latest version of Telerik, Vista running IIS 6 and have the same issue. I can't rename, delete or move files.

I've set all 3 paths in the config and granted the ASP.NET user full control of the folder and the root folder of my demo site I set up to test this control. I get a pop up dialogue advising me the application doesn't have permissions and to contact an admin.

Is there another user I need to grant access/permissions on the folder?
0
Lini
Telerik team
answered on 29 Apr 2009, 07:36 AM
Hello,

If your web application is using impersonation, then you will need to grant the appropriate permissions to the current user. Otherwise you need to grant read/write permissions to the user, which IIS uses to run your web application (e.g. the application pool identity, network service).

We have not heard anything from Jeff (the original poster) so we are not sure if the problem was resolved in build 2009.1 402 or if it was in his web site configuration.

A couple suggestions - if you have disabled the ViewState of the FileExplorer control, please enable it again. This has been known to cause problems with the control. Also, see if your application runs OK under the ASP.NET development web server from Visual Studio.

Kind regards,
Lini
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.
0
Jeff Adkisson
Top achievements
Rank 1
answered on 29 Apr 2009, 01:27 PM
I'm still here... I had to move on after a few days, so I gave up and wrote a clone. I never got the RAD File Explorer working in our product. I built my clone using the same RAD controls that make up the File Explorer... works great.

The control works fine in the demos, but I had no success getting working reliably when using Windows authentication. While working with it, I pretty much granted full authority to anything and everything to see if I could locate what was hanging up the control... never fixed it.

I'd love to use the control in the future, so perhaps someone will figure out what I'm overlooking.

Perhaps you could create a demo that uses Windows authentication, NTFS, etc. to show how to work with the control in that environment.

Regards - Jeff
0
Lini
Telerik team
answered on 05 May 2009, 07:00 AM
Hi Jeff,

Whether your site is using Forms authentication or Windows authentication without impersonation should not matter - the same account (Network Service by default) is used to access resources from the site. If this account has read/write permissions on the physical application files, the file explorer should work.

If you are using windows authentication with impersonation, then the application users will also need to have read/write permissions on the folders, because the server will use their identity to perform operations and access resources.

Finally, your application must be running under Medium trust or higher. Lower trust levels do not allow reading/writing files in the application folder. If you must run your application in a low trust level, then we suggest that you add the Telerik.Web.UI assembly to the server's GAC. This way it will run in Full trust, while the rest of the application will run under your trust level. This will allow the FileExplorer control to work properly.

Greetings,
Lini
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.
0
Dheeraj
Top achievements
Rank 1
answered on 04 Jun 2009, 10:34 AM
Guys, faced the same problem.

To our surprise, the file explorer was able to do all things i.e. Creating/Deleting/Uploading when we set the config at design time, but doing the same from codebehind gave the same error. "Don't have enough premissions".

We were setting the config values like this:

If (!IsPostback)
{
            radMyDocuments.InitialPath = "/UserFiles/AccountID_1/UserID_1/My Documents";

            string[] DocPaths = new string[] { radMyDocuments.InitialPath };
            radMyDocuments.Configuration.ViewPaths = DocPaths;
            radMyDocuments.Configuration.DeletePaths = DocPaths;
            radMyDocuments.Configuration.UploadPaths = DocPaths;
}

We removed the check If IsPostback and it started working fine ...

Hope it helps someone....
0
Lini
Telerik team
answered on 04 Jun 2009, 10:58 AM
Hi Dheeraj,

I think the problem was caused by disabled ViewState on the RadFileExplorer control. You should not set EnableViewState="false" for the file explorer, because it will not be able to remember its configuration between postbacks. The problems you will encounter are likely to be "not enough permissions" - the control will block all file operations because the UploadPaths, DeletePaths will be empty after a postback.

Greetings,
Lini
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.
0
Dheeraj
Top achievements
Rank 1
answered on 05 Jun 2009, 09:54 PM
Ok, Let me try the suggestion and get back. Though i don't remember setting Viewstate to false myself. Is it set to not use viewstate by default? Anyways, will get back soon...
0
Jay Mathis
Top achievements
Rank 1
answered on 07 Jul 2009, 04:57 PM

I can confirm that this is still a problem in the latest Q2 release.

If I set the paths declaritively using the design time UI, it works fine.   If I set it in the Page_Load event, it will let me upload and create folders, but not rename or delete.

 

I have EnableViewState= true

i have also tried to set the paths in the Init event for the control and the page with no luck.  It only seems to work if the paths are declaritively set.

0
Jay Mathis
Top achievements
Rank 1
answered on 07 Jul 2009, 05:23 PM
I was able to solve my issue.

I has been forming the path like this:

 

 

Dim sPath = System.IO.Path.Combine(System.IO.Path.Combine(PortalSettings.HomeDirectory, "ReitDocs"), _ReitID.ToString)  
 

which was giving a string like this:

/Portals/0/ReitDocs\475

Apparantly, the "\" before the 475 is what caused the issue.

I changed the constructor to be like this:

Dim sPath = System.IO.Path.Combine(PortalSettings.HomeDirectory, "ReitDocs") + "/" + _ReitID.ToString 


which yeilds:

/Portals/0/ReitDocs/475

and now all works fine...

 

0
murugesan Ramalingam
Top achievements
Rank 1
answered on 09 Oct 2009, 06:39 AM
i am having trouble in uploading photos in new folder in server side.
pls help
0
Fiko
Telerik team
answered on 14 Oct 2009, 11:39 AM
Hello Murugesan,

Could you please provide a little bit more information about the problem? It will be best if you open a new support ticket and send us a runnable project that reproduces the problem. We will check it and do our best to provide a solution.

Regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
John Stewart
Top achievements
Rank 1
answered on 03 Feb 2010, 08:10 PM
I was having the problem where I could upload a file to a virtual directory pointing to a share on another computer but i could not move or delete existing files.  I had all my security set up with all possible permissions but could not fix the problem.  My deletepaths, viewpaths and upload paths were exact.  Here was the problem
Here is a sample of how my paths were set:

\imagelibraries\ministries\
This allowed uploading but broke on deleting
i changed them to

 

/imagelibraries/ministries/



Now everythign works....Hope this helps someone having the same issue as me.
0
Amit Singh
Top achievements
Rank 1
answered on 29 Nov 2010, 02:23 PM
Hi,
I have read every post in this thread and tried it on my Control yet I am unable to Delete or rename Files/Folders, I can create New Folders though!!!
I think the problem is with granting permissions... Can someone let me know how do I ensure the permissions are granted correctly?

Awaiting reply....
0
Fiko
Telerik team
answered on 02 Dec 2010, 09:07 AM
Hi Amit,

I recommend you to perform the suggested test in this thread. In case that the test does not show any error messages, could you please isolate the problem in a small runnable project, open a new support ticket and send it to me? I will debug it and do my best to provide a solution as soon as possible.

Kind regards,
Fiko
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Ismael
Top achievements
Rank 1
answered on 06 Dec 2011, 05:18 PM
I had the same issue, the problem is caused because it creates an update panel and that fails with an error 405. it worked local but not on the server. look at this link http://forums.asp.net/t/1413496.aspx, fix it by adding this:

<script language=javascript>

    Sys.Application.add_load(AppLoad);

    function AppLoad() {
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest);
        Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequest);
    }

    function BeginRequest(sender, args) {
        // Clear the error if it's visible from a previous request.
        if ($get('Error').style.visibility == "visible")
            CloseError();
    }

    function EndRequest(sender, args) {
        // Check to see if there's an error on this request.
        if (args.get_error() != undefined) {
            // If there is, show the custom error.
            $get('Error').style.visibility = "visible";

            // Let the framework know that the error is handled,
            //  so it doesn't throw the JavaScript alert.
            args.set_errorHandled(true);
        }
    }

    function CloseError() {
        // Hide the error div.
        $get('Error').style.visibility = "hidden";
    }
</script>

0
Ismael
Top achievements
Rank 1
answered on 06 Dec 2011, 08:40 PM
i found the cause of my issue. if i looked at the page as http://myweb.com i can upload but cant delete, rename or move. if i look at it as http://myweb.com/Default.aspx the control behaved like is suppose to. I'll find a work around by not having the control in the default document page and this does not involve clearing the Ajax errors.
If someone can try it out and see if this is a known issue, it'll be great if it gets fixed in a future version. i'm using a master page, don't know if this matters.
0
Dobromir
Telerik team
answered on 07 Dec 2011, 02:19 PM
Hi Ismael,

RadFileExplorer's functionality is heavily based on client-side callbacks and ajaxifying the control is not recommended. If you need to avoid postbacks when uploading file, I would recommend you to enable the async upload feature. To do this you need to set EnableAsyncUpload property of RadFileExplorer to true.

Regarding the issue from your second post, if you have RadCompression enabled and you are using .NET 4.0, event handlers might not be raised in a default document in IIS 7 or IIS 7.5 Integrated Mode. Please try setting preCondition="managedHandler" and the runAllManagedModulesForAllRequests setting from your web.config for the RadCompression module.

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
Antony
Top achievements
Rank 1
Iron
answered on 15 Jun 2015, 04:07 AM

I could not delete with the following configuration:

<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server"  >
     <Configuration ViewPaths="~\Docs" UploadPaths="~\Docs"  DeletePaths="~\Docs" ></Configuration>
 </telerik:RadFileExplorer>

I found the solution was to use the correct slash - ie ~/Docs

Tags
FileExplorer
Asked by
Jeff Adkisson
Top achievements
Rank 1
Answers by
Shaun Peet
Top achievements
Rank 2
Jeff Adkisson
Top achievements
Rank 1
Lini
Telerik team
vikas
Top achievements
Rank 1
Fiko
Telerik team
Michael Dunbar
Top achievements
Rank 2
Dheeraj
Top achievements
Rank 1
Jay Mathis
Top achievements
Rank 1
murugesan Ramalingam
Top achievements
Rank 1
John Stewart
Top achievements
Rank 1
Amit Singh
Top achievements
Rank 1
Ismael
Top achievements
Rank 1
Dobromir
Telerik team
Antony
Top achievements
Rank 1
Iron
Share this question
or