U4-9004 - Remove URLRewriting.net dependency

Created by Sebastiaan Janssen 22 Sep 2016, 10:41:16 Updated by Shannon Deminick 29 May 2017, 18:16:07

Tags: Unscheduled

Is duplicated by: U4-9607

Relates to: U4-9005

URLRewriting.net is old, leaks memory and takes a lot of CPU and slows down starting the website when there's more than a few rules.

Use the IIS Rewrite plugin instead.

Comments

Sebastiaan Janssen 22 Sep 2016, 10:41:47

Note to contributors: make sure to target the dev-v8 branch for this.


Ívar Oddsson 18 Oct 2016, 22:50:36

Just made a PR that addresses this issue. I am however not sure if it's as easy as i imagine. Please guide me if I'm way off :)

https://github.com/umbraco/Umbraco-CMS/pull/1536


Sebastiaan Janssen 09 Mar 2017, 10:38:36

Note: upgraders will still have the config file and references in web.config. I was going to make a web.config transform to remove the rewrite bits but realized we don't want to do that in case people are actually using this module, it would break all their rewrites.

Fresh installs won't have URLRewriting.net any more as of 7.6.0.


Sebastiaan Janssen 09 Mar 2017, 11:01:15

PR https://github.com/umbraco/Umbraco-CMS/pull/1786

Testing

  • No remnants of UrlRewritingNet.UrlRewriter.dll should be left in the bin folder
  • No references to UrlRewritingNet should be left in the NuGet packages we produce
  • No references to urlrewritingnet should remain in web.config
  • No remnants of urlrewriting.config should remain in the config folder
  • NuGet: upgrading an existing install that had UrlRewritingNet installed should leave it as it was (see comment above)

Backwards compatibiliy

Marked as not backwards compatible because it changes the expectation of this module being available out of the box. If this is still a requirement for someone they can install the UrlRewritingNet package in their solution and use it like before (http://nuget.org/packages/UrlRewritingNet). Our recommendation is to use IIS rewrites instead for perfomance and standardization reasons.


Shannon Deminick 13 Mar 2017, 06:30:23

An upgrade will leave the urlrewriting thing in the web.config but the actual urlrewriting config file is removed - unless perhaps it's been modified. I didn't modify mine and it got removed on upgrade, i'll re-test after I've modified


Shannon Deminick 13 Mar 2017, 06:43:14

Yup, if it's modified it doesn't remove it so all good there


Chriztian Steinmeier 13 Mar 2017, 08:10:28

What's the feeling towards having the IIS Rewrites in a separate file by default? It's not difficult to do, but there's a couple of gotchas involved for someone (=> me) who doesn't do this every day.

If it was already setup with a few examples in a comment in the file, and a link for further exploration, just like the UrlRewriting.config file did, it should be easy to "get".

I know that's definitely what kept me on the UrlRewriting path for way too long, even though clever people like yourselves told me there was a better way :-)


Shannon Deminick 14 Mar 2017, 05:47:50

One problem with that is that the section would need to be commented out because if people don't have the IIS module installed (I'd say the vast majority of hosting providers would) then you'd get YSODs. Easiest thing would just be to put a link in like this:

  <!--
  If you wish to use IIS rewrite rules, see the documentation here: 
  https://our.umbraco.org/documentation/Reference/Routing/IISRewriteRules
  <rewrite>
    <rules>      
    </rules>
  </rewrite>
  -->


Shannon Deminick 14 Mar 2017, 06:10:52

I have added this to the default web.config now and added docs


Sebastiaan Janssen 14 Mar 2017, 10:02:17

@Shandem I moved that part into system.webServer to avoid confusion.


Shannon Deminick 19 Apr 2017, 05:56:22

I will update the ReadmeUpgrade.txt file


Priority: Normal

Type: Task

State: Fixed

Assignee:

Difficulty: Very Easy

Category:

Backwards Compatible: False

Fix Submitted:

Affected versions:

Due in version: 7.6.0

Sprint: Sprint 54

Story Points:

Cycle: