Copied to clipboard

Flag this post as spam?

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


  • Brett Spencer 51 posts 204 karma points
    1 week ago
    Brett Spencer
    0

    Help! Need to have a text file read directly under Domain

    A marketing management tool requires this to be done TODAY!!!

    I did this once, somehow, a long time ago. Don't remember how.

    I was able to tell Umbraco to show the file (url management).

    How can I do this? ---- I don't really need to edit inside of Umbraco!

    http://mydomain.com/accesstextfile.txt

  • Nik 444 posts 1743 karma points
    1 week ago
    Nik
    100

    Hi Brett,

    The easiest way to do this might be to put the file name in the reserved urls list in webconfig. It is under appSettings, you could add you file in there like this:

    <add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd, ~/accesstextfile.txt" />
    

    Nik

  • Brett Spencer 51 posts 204 karma points
    1 week ago
    Brett Spencer
    0

    This is the solution BUT I had to remove the first few entries as they were throwing a YSOD.

    Thank you Nik you saved alot of our #$$&#.

  • Nik 444 posts 1743 karma points
    1 week ago
    Nik
    0

    No problem, you probably had issues with the code I posted because it was from a v7 install not a v4 :-)

  • Nicholas Westby 1586 posts 5163 karma points c-trib
    1 week ago
    Nicholas Westby
    0

    Does it actually have a ".txt" extension? I have had no issue putting text files in the website. They just work. Just put them on the file system where your website is located.

  • Brett Spencer 51 posts 204 karma points
    1 week ago
    Brett Spencer
    0

    Yes, .txt - Trying to get Niks solution to work right now.

    Bear in mind, this is version 4!

Please Sign in or register to post replies

Write your reply to:

Draft