This project is read-only.

UrlRewriter problem?

Sep 19, 2008 at 7:53 AM
Edited Sep 19, 2008 at 7:56 AM

in a new project, based on when I do this:
Response.Write(Custom.ciEvents.Url + "<br/>");
Response.Write(Custom.ciEvents.TemplateUrl + "<br/>");
Response.Write(Custom.ciEvents.Name + "<br/>");

I get

where I expected

The Url is not rendered correctly...
Anyone a hint as where I should look for a solution?

Sep 19, 2008 at 9:09 AM
Does the url rewriter recognize Custom.ciEvents.Parent as the start page? And see if addinga  node to <sites> makes any difference.
Sep 19, 2008 at 9:46 AM
Response.Write(Custom.ciEvents.Parent.Name + "<br/>") gives root, which is correct.
.Url is the same as TemplateUrl in the entire site...strange..

Changed the web.config, still the same.
        <host rootID="3" startPageID="4">
                <add id="1" name="localhost">
            <web extension=".aspx" />
            <outputCache enabled="false" duration="10"/>           
            <globalization enabled="false"/>
            <scheduler keepAlive="true" interval="10"/>
                <add assembly="N2"/>
                <add assembly="N2.Edit"/>
                <add assembly="N2.Security"/>
            <installer checkInstallationStatus="false"/>
                <add path="~/Upload"/>
        <database connectionStringName="N2CMS" flavour="SqlServer2005"/>
Sep 19, 2008 at 11:39 AM
You're saying that Parent gives root. What happens if you move it to the start page? The url parser only makes friendly urls for pages that are under a start page.
Sep 19, 2008 at 1:42 PM
That's it...I wasn't paying attention, thanks!