Closed xorxornop closed 8 years ago
This seems to be behaviour that has changed from RC2 to RTM. You can have a look at the linked changeset for details of the change (Other refactoring is included).
Strangely in my testing I was getting the opposite behaviour which is why I did not catch it. After using a different machine I get the behaviour you are seeing.
I've released the fix to the project template. However, I've just realized that NWebSec is still using the old RC2 version. I've really made a hash of this release this time. You can look at https://github.com/NWebsec/NWebsec/issues/59 to see when that package gets updated and then just upgrade it.
I pushed new packages just now, upgrade away. :)
Thanks for fixing it :) ! I'd have given a PR but I wasn't sure how you'd approach fixing it... and was myself new to both RC2 and RTM (all my projects are waiting to be migrated from RC1, once I get a proper handle on things). Glad I managed to bring it to your attention at least: odd how one machine did and and other didn't - any clue as to why? Method invocation ordering reaaaaaallly shouldn't differ between computers - right?!
@klings As an aside, thank you for making NWebsec, it's a great library.
I didn't expend any time looking into it. I added a IOptions
Thanks @klings NWebSec also updated!!!
ConfigureServices()
throws aNullReferenceException
in theAddMvc(options =>)
lambda in the call toAddRedirectToCanonicalUrlFilter(this.routeOptions)
this.routeOptions
is null - apparently, the call toAddRouting
happens after the call toAddMvc
, despite their lexical ordering in the actual code (huh, that's weird. You'd think the middleware would run in set-up order...), and sothis.routeOptions
hasn't been given its value yet.I built the project from latest source (6d975ae).