We have answer of your question!

100% solved queries, no empty question

Question: Json file request produce "(413) Request Entity Too Large"。


I have a json file more than 10,000 rows

so when I request to Power BI

I'll get a error message

(413) Request Entity Too Large。

if the Json file < 10,000 rows this code is can work

so how I can fix this problem about the rows too mush

this is my code

string ColumnValuesJson = System.IO.File.ReadAllText(@"PowerBI_Column_Values.json");

//POST web request
byte[] byteArray = System.Text.Encoding.UTF8.GetBytes(ColumnValuesJson);

request.ContentLength = byteArray.Length;

using (Stream writer = request.GetRequestStream())
    writer.Write(byteArray, 0, byteArray.Length);
    var response = (HttpWebResponse)request.GetResponse();

    Console.WriteLine("20,000 Rows  {0} ms", ProcessTime.ElapsedMilliseconds);
Question author Minghong-zheng | Source



413 errors occur when the request body is larger than the server is configured to allow. Here’s how you can fix it, depending on your web server (and if you have access to it):

If your not the owner of the server you could either try uploading a smaller compressed file or sending the request with an multipart/form-data Content-Type. Here are some examples how to do it.

As concluded in the comments you want to call the AddRows method on the Power BI REST API. In the limitations is mentioned that that only 10'000 rows can be added per request. The easyiest thing to do would be parsing the json file to an array and send mutiple requests. To parse JSON in c# you can take a look at this article

Answer author Dr-fre

Tickanswer.com is providing the only single recommended solution of the question Json file request produce "(413) Request Entity Too Large"。 under the categories i.e c# , .net , json , webserver , powerbi , . Our team of experts filter the best solution for you.

Related Search Queries:

413 request entity too large c# ,

You may also add your answer

Thanks for contributing an answer to Tick Answer!