0

I want to send to an Azure Function parameter an XML file converted in Base64. Unfortunately if the XML is too large when I invoke the Azure Function it reply with an "HTTP ERROR 414". I'm developing the Azure Function in Visual Studio and I have the error already when I run it in localhost.

I use the default HTTP Trigger request and I invoke it insert manually the url on browser.

public static async Task<IActionResult> Run(
        [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
        ExecutionContext context,
        ILogger log)
    { ... }

The url is http://localhost:7071/api/FatturaPassiva?NumeroFattura=456&FileXml=PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVR...

I tried to simulate a POST request but I stil have the same error.

enter image description here

enter image description here

How can I solve the problem or set a bigger limit? Thanks in advance for your replies.

Simone

  • Do you use `get` request, if yes, could you please use `post` request to transfer your xml file. – Frank Borzage Sep 14 '20 at 09:03
  • I use the default request: public static async Task Run( [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, ExecutionContext context, ILogger log) {} – Simone Colombo Sep 14 '20 at 09:04
  • Did you call your function like this:`https://myfunction.azurewebsites.net?xml=xxxx(base64)` – Frank Borzage Sep 14 '20 at 09:14
  • I am in localhost so I call the function like this (with a shot xml it works correctly): http://localhost:7071/api/FatturaPassiva?NumeroFattura=456&FileXml=xxxx(base64) – Simone Colombo Sep 14 '20 at 09:18

0 Answers0