I have an asp.net core web api, that enables tts requests. You basically request http://server.url/Whatever you want it to say.mp3
to get an mp3 with the text spoken in tts.
But the problem is, that it will return a 400 - The request URL is invalid
if I pass it a long string. It seems like the server is hitting some sort of max URL length limitation. I can find information on how to fix this is the "classic" asp.net web.config, but not how to fix this in asp.net core.
What is the correct way of increasing the maximum URL length in asp.net core?
Update:
The exact url is for instance:
It is URL-encoded. I'll try to figure out what the exact maximum is.
I cannot use a POST, as the tool that is going to make use of this only supports urls for mp3 files (hence the .mp3 extension used in my controller).
Update 2
The longest request it accepts has 397 characters, which does not seem very logical. If I add one more, it will return a code 400.
Update 3
It turns out to only have this issue when deployed on the server (using IIS), when run locally, it supports way longer strings (I haven't seen it return a code 400 yet). I'll have to look into IIS to see where it goes wrong.