Jayaprakash P G
Jayaprakash P G

Reputation: 31

Dots in URL causes 404 with Web API call in .net core

I have a similar requirement which is mentioned in the link Dots in URL causes 404 with ASP.NET mvc and IIS . Our requirement is, we also do have URLs with dots in the path. For example I may have a URL such as www.example.com/people/michael.phelps (This example is taken from above link) URLs with the dot generate a 404. If we pass without the dot, then everything works. If we add the dot I get a 404 error.

The above link provide solution for earlier versions of .net where we can have webconfig files. But we are using .net core to build web API application. Dotnet core does not support webconfig files. Can someone please suggest how can we arrive at the solution by using .net core.

Upvotes: 3

Views: 1594

Answers (1)

unkreativ
unkreativ

Reputation: 480

Late answer but we had a similar case:

We had a url looking like https:/domain.com/somepath/smoething.cd

This returned a 404 from the IIS. Adding a / at the end of the url behind the .cd fixed the issue.

Strange but notable: not all.something return a 404, .com at the end of the path for example works

Upvotes: 1

Related Questions