401 Error

6 posts, 0 answers
  1. Frank
    Frank avatar
    86 posts
    Member since:
    Mar 2012

    Posted 23 Apr 2014 Link to this post

    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.
  2. Vessy
    Admin
    Vessy avatar
    1383 posts

    Posted 24 Apr 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Frank
    Frank avatar
    86 posts
    Member since:
    Mar 2012

    Posted 07 May 2014 Link to this post

    I have tried to add those line to my web.config but I still get the same error
  5. Frank
    Frank avatar
    86 posts
    Member since:
    Mar 2012

    Posted 07 May 2014 in reply to Frank Link to this post

    I have added IIS_IUSRS to have full control over the folders where the files exists
  6. Frank
    Frank avatar
    86 posts
    Member since:
    Mar 2012

    Posted 08 May 2014 Link to this post

    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?
  7. Vessy
    Admin
    Vessy avatar
    1383 posts

    Posted 09 May 2014 Link to this post

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017