Access is denied

2 posts, 0 answers
  1. Curtis
    Curtis avatar
    2 posts
    Member since:
    Dec 2013

    Posted 28 Apr 2015 Link to this post

     I am using this example below to browse folders from a UNC path.

     http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/details/use-radfileexplorer-with-physical-and-shared-folder-s-paths 

    I can browse the folders and it displays the files just fine. But when I try to Preview the a pdf if the this error. 

    Access to the path '\\server\\MyPath\MyPDF.pdf' is denied.

     

     

     In the Web.conifg I have

    <identity impersonate="true" userName="domain\user" password="MyPassword"/>

      <location

    path="FileSystemHandler.ashx" allowOverride="true">
    <system.web>
    <identity impersonate="true" userName="domain\user" password="MyPassword"/>
    <authorization>
    <allow users="*"/>
    </authorization>
    </system.web>
    </location>

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

     

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 01 May 2015 Link to this post

    Hi Curtis,

    If the browesr requests a network path like \\server\path, then something is likely to be going amiss in the path resolution logic. I can only advise that you step through the handler and see how the physicalPathToFile variable is changed, as it should point to a folder under your site in the end. If this does not happen, there may be a mismatch between the FileExplorer configuration, the mapping file and the provider that you would need to debug.

    In case the error is thrown in the handler after it maps the application folder to the actual network path, you should provide adequate permissions to all files and folders you want shared so the code can access them.

    Regards,

    Marin Bratanov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

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