Home > Blockchain >  ASP.NET Core 6 routing in Azure App Service with ".dd" ending in the url
ASP.NET Core 6 routing in Azure App Service with ".dd" ending in the url

Time:07-16

I have an ASP.NET Core 6 Web API that has a simple endpoint /resources/{id} where id is a string. Everything worked as expected in local development. We then deployed it to a standard Azure App Service.

We got a bug report when this particular URL was requested /resources/d.dd. The response was

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

I have tried with these variations

  1. resources/d.dd/
  2. resources/d.vn (and other top-level domain name)
  3. resources/hello.dd
  4. resources/d.ddd
  5. resources/d.txt

All worked except for d.dd without the last / in the URL.

I ran it locally. It worked. The d.dd was parsed and seen as the id.

It seems that .dd is routed as a file extension by the webserver on Azure. I spent hours looking around and checking Azure settings. I found nothing.

I am looking for a hint or suggestion. Thank you for your time and help.

CodePudding user response:

UPDATE

We can enter image description here

Test Result

enter image description here

  • Related