Copied to clipboard

Flag this post as spam?

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


  • Brad 94 posts 151 karma points
    Mar 13, 2013 @ 01:09
    Brad
    0

    Custom Section: No umbraco document matches the url

    I have had some success added my first custom section to Umbraco 6. My project need a simple Competition engine so this is a good test run of the process of adding custom dashboard pages.

    So far I have a new Section icon created and working. When you click it the new Competitions section links are loaded.

    When I click for example the Add Competition button, the panel on the right should load an .aspx page called addCompetition.aspx. However I get this.

    I can guarentee that the addCompetition.aspx page exists.

    (Note the test.html file)

    Even if I put that url directly into the browser..

    http://localhost/WebForms/addCompetition.aspx

    it does not work.

    I can even guarentee that the path is correct by loading the test.html file. If I put in

    http://localhost/WebForms/test.html

    ... the test.html page is displayed.

    Next as test I changed the code to load a UserControl in the right panel instead. A control called addCompetition.ascx

    However that resulted in this error..

    The request filtering module is configured to deny the file extension.

    Is there some Umbraco config file that needs to be set up to allow either of the techniques above to work?

    Should I use a webform or a usercontrol on the right of the dashboard?

    Another thought I just had is, could it be that Umbraco 6 is looking for an MVC View for the right panel?

    WebForm, UserControl, View? I don't care. I just need to know what to build and how to let Umbraco 6 know to accept it. 

     

     

     

     

  • Nigel Wilson 944 posts 2076 karma points
    Mar 13, 2013 @ 04:09
    Nigel Wilson
    0

    Hi Brad

    I built http://our.umbraco.org/projects/backoffice-extensions/tag-manager using a custom section - this is based on web forms.

    The source code is available so feel free to download that.

    A snippet of code from the project which relates to your question is below with the id being the id of the tag entry in the database table.

    public override void RenderJS(ref StringBuilder Javascript)
            {
                Javascript.Append(
                    @"
                        function openTagMaint(id) 
                        {
                            parent.right.document.location.href = 'plugins/TagMaint/edittagData.aspx?id=' + id;
                        }
                    ");
            }

    Not sure if this will answer your question but hope it helps.

    Cheers, Nigel

     

  • Brad 94 posts 151 karma points
    Mar 13, 2013 @ 06:12
    Brad
    0

     

    Nigel

    That code looks identical to the code I have used..

    I can see from my screen shot above the path to the page is correct.

    localhost/WebForms/addCompetition.aspx

    So the issue is not in this Render method.

    The path is correct, the aspx page is not found but an HTML file in the same folder is.

    I just don't get it.

     

     

     

     

  • Rich Green 2246 posts 4008 karma points
    Mar 13, 2013 @ 07:08
    Rich Green
    100

    Hey Brad,

    Don't you just need to add to your reserved paths in web.config?

    <add key="umbracoReservedPaths" value="~/umbraco,~/webforms/" />

    Rich

  • Stephen 767 posts 2273 karma points c-trib
    Mar 13, 2013 @ 11:09
    Stephen
    0

    The pipeline takes over your url and assumes it's the url of an Umbraco document. Which makes sense, because the "WebForms" folder is unknown to Umbraco ie it's not one of the reserved paths -- where we know we're not processing an Umbraco document but a normal aspx page. Can you try Rich's suggestion? That should tell the pipeline that "WebForms" is special and _not_ the path to an Umbraco document.

  • Brad 94 posts 151 karma points
    Mar 13, 2013 @ 22:43
    Brad
    0

    Give that man a cigar, or a beer, day of bug free coding! :)

    That was it. I just had to add the WebForms folder to the umbracoReservedPaths key in appSettings.

    Safe to say I would NEVER have worked this out by myself.

    Thanks Rich and thanks Stephan for the explaination.

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft