Copied to clipboard

Flag this post as spam?

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


  • Dan Sørensen 102 posts 327 karma points
    May 07, 2015 @ 11:37
    Dan Sørensen
    0

    Make page outsite of umbraco

    As I Try to explain in the description, I'm making a schedule job to run a page once every night, but the page must not appear in umbraco backend. I thought to just create a page with a macro where the macro just called a controller and does its job, but where is best practice to create this page. I thought in the umbraco folder where ping.aspx is but if I'll Updating umbraco I am afraid of losing the file.

    Maybe someone have been around this before.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    May 07, 2015 @ 11:53
    Dennis Aaen
    100

    Hi Dan, 

    I would make a folder in the filesystem besides the folders that comes with Umbraco, then you will not be afraid to lose the file if you upgrads Umbraco. 

    In the web.config you need to add the path to your custom .aspx file in the Umbraco specific key "umbracoReservedUrls"

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

    So you need to add the path to your file in this list as well like

    <add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx, ~/the/path/to/your/file.aspx"/>

    Hope this helps,

    Dennis

  • Dan Sørensen 102 posts 327 karma points
    May 07, 2015 @ 13:47
    Dan Sørensen
    0

    Thanks for the help Dennis ! :)

    I have made an folder called test and in this a file called testFile.aspx and I have added the path to the umbracoReservedUrls as following

    <add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx, ~/test/testFile.aspx"/>
    

    But when I call the url localhost:portID/test/testFile.aspx I get the 404 error page not found :/

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    May 07, 2015 @ 13:52
    Dennis Aaen
    0

    Hi Dan, 

    From your example you should be able to access the file on the following URL

    localhost:portID/test/testFile.aspx

    Hope this helps,

    Dennis

  • Dan Sørensen 102 posts 327 karma points
    May 07, 2015 @ 14:43
    Dan Sørensen
    0

    Sorry I edit my last answer I already tried localhost:portID/test/testFile.aspx But cant access the file :/.

    okay my mistake I looked at he url agian and saw i misted the aspx :D thanks for the help Dennis !

    Do you know how I run an macro from here then :D ? and is it even possible.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    May 07, 2015 @ 14:53
    Dennis Aaen
    0

    Hi Dan,

    Glad that I could help you. Don´t lnow if it´s possible to run an macro from an aspx outside Umbraco. You could try to create a new post, then I am almost sure that some of the .NET guys, can answers this.

    /Dennis 

Please Sign in or register to post replies

Write your reply to:

Draft