I never experienced such issue, but it appears as part of route and if I manually enter route then the result is 404
.
If I copy from swagger %E2%80%8B
appears.
How can I fix this issue?
.Net Core 2.1
http://localhost/functionCodes/%E2%80%8Btest - works
http://localhost/functionCodes/test - 404
The URL trailing with the unwanted %e2%80%8e, is token of your defected copy and paste method. Here defected means, the copied words contains the unusual character or hidden space. Due to this, the URL becomes the ugly.
%E2%80%8B is the code for a "ZERO-WIDTH SPACE" character.
IApplicationBuilder An object that provides the mechanisms to configure an application's request pipeline.
As per: this chart
%E2%80%8B
is the code for a "ZERO-WIDTH SPACE" character.
It has probably been inserted without you noticing it somehow, you probably can't see it in your code, but it is here.
I recommend completely removing the string (including the surrounding quotes!) where the URL is defined and re-write it.
Since you use ASP.NET, this path may come from the name of an Action method in a Controller, but the solution is the same: remove completely the name of the Test()
method, making sure you delete some space characters before that, and rewrite-it.
If you want to inspect this, you can probably use some advanced text editor or hexadecimal editor to view that it is actually in the source code.
There may be some Visual Studio extensions that would help you view these hidden characters as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With