User61956409 posted
Hi,
Welcome to ASP.NET forums.
FartsSmellDelicious
if I hit my API like this localhost/api/Test/email@email.com
I get this error shown on screen --- this is windows 10 IIS if it matters.
HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
According to your description and code, I can reproduce same issue on my side. I find that the issue is caused by the ".
" of email address. To solve the problem, you can try to manually add a slash "/
"
at the end of url, such as “http://localhost:64959/api/test/email@email.com/”.

Besides, another approach is using URL Rewrite rule, like below.
<rewrite>
<rules>
<rule name="Add trailing slash" stopProcessing="true">
<match url="^(api/test/.*\.[a-z]{2,4})$" />
<action type="Rewrite" url="{R:1}/" />
</rule>
</rules>
</rewrite>
With Regards,
Fei Han