Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vincent Ashby-Smith 67 posts 196 karma points
    Jun 25, 2014 @ 17:38
    Vincent Ashby-Smith
    0

    Redirecting to 404 page when clicking on download link

    Hi all, i've got a few strange problem. I have a folder full of .zip files, which aren't in the media section of Umbraco, just a standalone folder. I've linked to these files and saved and published, but when i try clicking on the link to download the file, i get redirected to my 404 page with this appended to the URL:

    /login.aspx?ReturnUrl=%2fresources%2fvbak-downloads%2fAgentConsole7221802.zip

    What's even more strange is some .zip files get served out to the browser fine and some don't! Any ideas?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 25, 2014 @ 17:52
    Jan Skovgaard
    0

    Hi Vincent

    Could you show how you have inserted the links to the files posting a screendump for instance. Think it will make it a bit easier to understand your issue.

    /Jan

  • Vincent Ashby-Smith 67 posts 196 karma points
    Jun 25, 2014 @ 17:55
    Vincent Ashby-Smith
    0

    Hi Jan, please see below:

    enter image description here

    Also i've added /resources into the umbracoReservedPaths key

    <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/virtual-worlds, ~/resources/" />
    
  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 25, 2014 @ 19:11
    Jan Skovgaard
    0

    Hi Vincent

    Hmm, the addition to the reserved paths key should not be neccesary when it's only files you're trying to link to I think. However what happens if you add the domain to the href? Then it should be possible to link to the file. (But maybe Umbraco removes the domain name when the content is save).

    /Jan

  • Vincent Ashby-Smith 67 posts 196 karma points
    Jun 26, 2014 @ 17:32
    Vincent Ashby-Smith
    1

    Hi Jan and all, I figured it out, so just sharing the knowledge. I'm using Windows Server 2012 and IIS 8.5 and it blocks serving out/downloading .exe files by default and gives you a 404 error, regardless of whether they are zipped up or not. So to get round this, you just need to add this key in your web.config

    <add name="Client exe" path="*.exe" verb="*" modules="StaticFileModule" resourceType="File" />
    

    See this blog for more details: http://mike-ward.net/blog/post/00631/how-to-configure-iis-7-to-allow-downloading-exe-files.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jun 26, 2014 @ 17:47
    Jan Skovgaard
    0

    Hi Vincent

    Aaah! I only noticed the .PDF file when i looked - Makes more sense now. Happy to see you got it solved and thanks for sharing! :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft