More in this section

Forums / Developing with Sitefinity / Emulating .aspx Urls created in Sitefinity v. 3.7

Emulating .aspx Urls created in Sitefinity v. 3.7

4 posts, 0 answered
  1. Samir Vaidya
    Samir Vaidya avatar
    261 posts
    Registered:
    05 Feb 2005
    01 Aug 2011
    Link to this post
    We are planning on upgrading to Sitefinity v. 4.1 SP3 from Sitefinity v. 3.7 SP4 on .Net 4.0.

    We have developed several custom applications/User Controls which relied on the earlier Urls created by Sitefinity.  These Urls have been sent to customers to check their profile information etc. on our website.

    However, once we upgrade to Sitefinity v. 4.1 SP3, we have noticed that none of the Urls contain the name of the .aspx page in the Url, thus breaking all of the links that have been sent to our customers.

    Is there any way to retain the original .aspx Url created in Sitefinity v. 3.7 SP4 in Sitefinity v.4.1 SP3?


  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    28 Aug 2017
    02 Aug 2011
    Link to this post
    Hi Samir Vaidya,

    You can either utilize a UrlRewriter such as this one and provide rewrite rules for the old URLs, add additional URLs (which redirect to the default one) to the pages, or change the page.UrlName property.

    e.g.
    var fluent = App.WorkWith().Pages();
                var mypage = fluent.Where(p => p.Page != null&&p.Parent=="Pages").ForEach(p => p.Page.UrlName = p.Page.UrlName+".aspx").SaveChanges();


    Greetings,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Samir Vaidya
    Samir Vaidya avatar
    261 posts
    Registered:
    05 Feb 2005
    02 Aug 2011
    Link to this post
    Where do I utilize this code in the context of Sitefinity?  Do I create a separate User Control for handling this and add it to the Page or do something else with changing the Page properties?
  4. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    28 Aug 2017
    02 Aug 2011
    Link to this post
    Hello Samir Vaidya,

    You can place it on a WebForm included in that project and simply navigate to it from the browser, the code will automatically execute.

    Greetings,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered