So I have a URL encoded path where the last part of the route is generated with WebUtility.UrlEncode (asp.net core 3.1)
blah/blah/MRgeOkgo8fqRVrQbUawTmtP6DbSN42QTXLqH1064Wl9P1iyi3v9%2F%2BmB36VOcz8WD7qSKoyJ3%2B0mZ874WQxAlptzQo6mylIa%2BN%2BKasrdkFXY0whRafA48UknQtP9BYXkg6QSfDGOxAu8Fl%2F%2Bq%2BIftYw%3D%3D
this is url encoded, so on the code at the path /blah/blah I decode it with WebUtility.UrlDecode to get
MRgeOkgo8fqRVrQbUawTmtP6DbSN42QTXLqH1064Wl9P1iyi3v9/ mB36VOcz8WD7qSKoyJ3 0mZ874WQxAlptzQo6mylIa N KasrdkFXY0whRafA48UknQtP9BYXkg6QSfDGOxAu8Fl/ q IftYw==
(which I then run through another encryption algorithmn to get the data out).
The problem is the URL encoded path generates a 404.11 when passed into IIS. IIS rejects the request because of double escaping. I know how to fix this, just add in
<security>
<requestFiltering allowDoubleEscaping="true" />
</security>
to the web config.
However, I don't know why IIS is generating a 404.11 because the URL looks fine.
What gives?