0

We have a web application which allow users to download documents from SharePoint. Recently we have received a requirement to enable downloading .exe file. But on clientContext.ExecuteQuery(); I am getting following error. Moreover, while retrieving file extension is coming as aspx instead of .exe.

FileUrl: http://domainname/Shared Documents/Forms/DispForm.aspx?ID=14394

Error

Access denied. You do not have permission to perform this action or access this resource.

Can anyone please suggest me how we can enable users to download .exe files directly using web application.

  • Please post relevant code. Also the FileURL is not correct. The url should be something like http://domainname/Shared Documents\file.exe – Amal Hashim Jan 12 '15 at 15:11
  • Are you able to download normal file like office documents (doc, docx, etc.)? – Amal Hashim Jan 12 '15 at 15:26
  • yes, I can download documents, zip files etc. – Scorpion Jan 12 '15 at 15:30
  • If you try to download the exe file from the library, is it allowing to do that? – Amal Hashim Jan 12 '15 at 15:31
  • Yes, it allows to download through SP. but in code I am getting Access denied. error. I think something is wrong with the url it is returing. – Scorpion Jan 12 '15 at 15:32
0

Following Answer actually sorted my Problem. Thanks to @daver306

Make SharePoint search results link to document instead of DispForm.aspx with no iFilter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.