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

401 Error

5 Answers 64 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 23 Apr 2014, 01:24 PM
I have a file explorer on a page, it works on dev and test.  In production I can upload files, delete files, but when I try and open files I get a 401 Error.  
Why would opening the file be causing this issue when I can do everything else.

5 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 24 Apr 2014, 12:31 PM
Hi Frank,

I have already answered your support ticket on the subject, for convenience I will paste my answer here as well:

When using RadFileExplorer with impersonation you need to apply impersonation to the Telerik.Web.UI.WebResource handler and the handler used by the control (if any), e.g.:

web.config
<
location path="Telerik.Web.UI.WebResource.axd" allowOverride="true">
   <system.web>
     <identity impersonate="true" userName="HostingServer\userName" password="userPassword"/>
     <authorization>
       <allow users="*"/>
     </authorization>
   </system.web>
 </location>

In case you are using a custom FileBrowserContentProvider in your application, you will need to add also permissions for its handler:
<location path="FileSystemHandler.ashx" allowOverride="true">
    <system.web>
       <authorization>
            <allow roles="*"/>
        </authorization>
    </system.web>
</location>

I hope this helps.

Regards,
Vessy
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Frank
Top achievements
Rank 1
answered on 07 May 2014, 06:55 PM
I have tried to add those line to my web.config but I still get the same error
0
Frank
Top achievements
Rank 1
answered on 07 May 2014, 06:56 PM
I have added IIS_IUSRS to have full control over the folders where the files exists
0
Frank
Top achievements
Rank 1
answered on 08 May 2014, 11:59 AM
Here are my settings
In iis app pool the Identity is NetworkService.  In the parent folder where the files are located IIS_IUSRS has full control. 

I can upload to the folders,  I can delete from the folders.  I have Handler.ashx that downloads pdf rather than loads them on the screen and it works.  It is only an issue when the user tries to open a jpg or other non handled files types in the browser.

Why would it not use IIS_IUSER permission setting?
0
Vessy
Telerik team
answered on 09 May 2014, 02:24 PM
Hello Frank,

May I ask you to test the permissions of the problematic files, following the approach from this help article?

Could you also provided more detailed information on the exact scenario the error occurs?
  • Is your FileExplorer working with a custom content provider?
  • What logic are you using for file downloading? Is it the one from this live demo or you have your custom implementation for it?

Can you prepare a sample fully runnable project demonstrating the configuration leading to the undesired behavior?

Looking forward to hearing from you,
Vessy
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
FileExplorer
Asked by
Frank
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Frank
Top achievements
Rank 1
Share this question
or