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

Access is denied

1 Answer 79 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Curtis
Top achievements
Rank 1
Curtis asked on 28 Apr 2015, 09:31 PM

 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>

 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 01 May 2015, 08:12 AM

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.

 
Tags
FileExplorer
Asked by
Curtis
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or