Search code examples
c#azureasp.net-core-8

Azure Web App: + in URL results in "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."


I am running an Azure WebApp (Windows) with an ASP.Net 8.0 WebAPI application. If I add an "+" char in the URL, I get following error: "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

GET xxx/v1.0/sync/testtest --> works fine

GET xxx/v1.0/sync/test+text --> do not work

If I run this locally, both requests work without any problems or errors. Other special chars also work (like % or ", etc.). I don't have any special configurations in my applications or WebApp settings. Any suggestions how I can fix this?


Solution

  • so I found the solution.

    I enabled "Failed request tracing" in the Azure Portal and opend the error xml for such an 404 response. The detailed error number was an "404.11", which stands for "HTTP Error 404.11 Not Found: double escape sequence". However, after I activated this I checked my web.config on the server and realised that it was in the wrong directory (wwwroot instead of root).

    Now the requests works.