Copied to clipboard

Flag this post as spam?

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


  • Joseph 59 posts 140 karma points
    Apr 21, 2015 @ 06:37
    Joseph
    0

    Preview not working

    I've just run into a rather odd, (what seems to be) environmental issue where CMS previews don't seem to be working. On my UAT environment (which also happens to be running a whole bunch of other Umbraco 4/6 websites without any issues), my previews from my Umbraco 7.2.2 website is not working. Instead, I get a 403 from the server with a You do not have permission to view this directory or page message.

    This website is running with no issues with preview on test and dev environments so it's clearly an environmental issue rather than a code issue. Also note that everything else on the UAT environment is working i.e. website, backoffice, etc - it's only preview that appears to be broken currently.

    Any ideas as to where I should look?

  • Joseph 59 posts 140 karma points
    Apr 22, 2015 @ 03:30
    Joseph
    0

    I've poked around to try and figure this out and have worked out that my application doesn't have access to the preview folder (which by default - which it is - would be created at App_Data/). This is super confusing because the application is able to read/write to umbraco.config and access.config without any issues.

    Would there be anything special about preview that would require something additional to the process that reads/writes to umbraco.config and access.config?

    If it makes any difference, my App_Data is set up as a virtual directory in IIS as I use Octopus Deploy for deployment.

  • Dan Lister 416 posts 1974 karma points c-trib
    May 17, 2015 @ 23:22
    Dan Lister
    0

    Hi Joseph,

    Did you get any further with this issue? I would love to hear about it if you did.

    Thanks, Dan.

  • Joseph 59 posts 140 karma points
    May 18, 2015 @ 05:50
    Joseph
    0

    Hi Dan

    No, unfortunately I've never been able to figure this one out. The workaround that has been employed is simply to move the website to a different web server which we happen to have access to. The two are set up slightly differently (because they were set up by different people at different times, etc) but we just could not work out what the differences in file permissions, etc are.

  • Matt Linsenbardt 11 posts 53 karma points
    Sep 02, 2015 @ 16:07
    Matt Linsenbardt
    2

    You may want to check that you have default documents set for the web site under IIS.

    In my instance, I had removed all documents, but the preview mode links to a directory with a query string. Because my directory browsing was disabled and I had no default document, I was receiving a 403 error. Adding index.html, index.htm as default documents resolved the problem.

    Cheers, Matt

  • Dan 43 posts 72 karma points
    Nov 02, 2015 @ 15:15
    Dan
    0

    adding index.htm and index.html as default docs worked for me too. That's been bugging me for ages. Cheers.

  • Stoo 1 post 71 karma points
    Sep 22, 2016 @ 11:50
    Stoo
    0

    Thanks for the solution, adding index.html and index.htm to the default documents under IIS fixed it for me too!

  • Anthony 26 posts 145 karma points
    Jul 16, 2017 @ 16:27
    Anthony
    0

    Thanks. Preview stopped working for me too. I'd disabled default documents in a Windows Azure application except for app_offline.html (maintenance page). Adding index.html and index.htm back and Preview worked again.

    I'm not sure why this works (matters). If someone could explain I'd appreciate it.

  • Tom Bruce 122 posts 506 karma points
    Dec 04, 2017 @ 15:39
    Tom Bruce
    0

    What do you mean added index.htm and index.html as default docs?

    Can someone please explain how to do this, thanks.

  • Murray Roke 502 posts 965 karma points c-trib
    Aug 22, 2018 @ 22:23
    Murray Roke
    0

    Summary:
    Don't add a default document in umbraco 7.4.3 (and probably others)

    Details:
    I found that in umbraco version 7.4.3 that if I had this in my web.config

    <defaultDocument>
      <files>
        <add value="index.html" />
      </files>
    </defaultDocument>
    

    Then I would get a generic error (not ysod) with status code 500 (IIS log shows status 500.19) I had to use the failed request tracing tool to get the real error

    Which was: Cannot add duplicate collection entry of type 'add' with unique key attribute 'value' set to 'index.html'

    When I removed the defaultDocument from the web.config it corrected the error. (it looks like the advice here was followed but the version of umbraco we have tries to automatically set the default document and can't)

Please Sign in or register to post replies

Write your reply to:

Draft