<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic response.StatusCode=500 InternalServerError in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/response-StatusCode-500-InternalServerError/m-p/794962#M20804</link>
    <description>&lt;PRE&gt;            if (File.Exists(pbixFilePath) == true)
            {
                //DeleteImport(workspace.id, NomedoCubo);

                string restUrlImportPbix = "https://api.powerbi.com/v1.0/myorg/groups/" + workspace + "/imports?datasetDisplayName=" + NomedoCubo + "&amp;amp;nameConflict=CreateOrOverwrite";
                var pbixBodyContent = new StreamContent(File.Open(pbixFilePath, FileMode.Open));

                pbixBodyContent.Headers.Add("Content-Type", "application/octet-stream");
                pbixBodyContent.Headers.Add("Content-Disposition",
                                             @"form-data; name=""file""; filename=""" + pbixFilePath + @"""");


                MultipartFormDataContent requestBody = new MultipartFormDataContent(Guid.NewGuid().ToString());
                requestBody.Add(pbixBodyContent);

                HttpClient client = new HttpClient();
                client.DefaultRequestHeaders.Add("Accept", "application/json");
                client.DefaultRequestHeaders.Add("Authorization", "Bearer " + AccessToken);


                Console.WriteLine("Enviando Cubo: " + NomedoCubo);
                var response = client.PostAsync(restUrlImportPbix, requestBody).Result;

                //  Check de Sucesso
                if (response.StatusCode.ToString().Equals("Accepted"))
                {
                    Console.WriteLine("Processo de Importação efetuado com Sucesso: " + NomedoCubo);
                }
                else {
                    Console.WriteLine("Processo com erro: " + response.StatusCode);
                }
            }
            else {
                Console.WriteLine("Arquivo não encontrado." + NomedoCubo); 
            }&lt;/PRE&gt;&lt;P&gt;I´m receiving InternalServerError for all my tenant customers. It´s strange because I was using last month andit was workin percfectly. Did anyone found the same problem?&lt;BR /&gt;&lt;BR /&gt;1) I have pro license.&lt;BR /&gt;2) It was working properly.&lt;/P&gt;&lt;P&gt;3) My code is the same.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Sep 2019 21:04:47 GMT</pubDate>
    <dc:creator>brunozanoelo</dc:creator>
    <dc:date>2019-09-17T21:04:47Z</dc:date>
    <item>
      <title>response.StatusCode=500 InternalServerError</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/response-StatusCode-500-InternalServerError/m-p/794962#M20804</link>
      <description>&lt;PRE&gt;            if (File.Exists(pbixFilePath) == true)
            {
                //DeleteImport(workspace.id, NomedoCubo);

                string restUrlImportPbix = "https://api.powerbi.com/v1.0/myorg/groups/" + workspace + "/imports?datasetDisplayName=" + NomedoCubo + "&amp;amp;nameConflict=CreateOrOverwrite";
                var pbixBodyContent = new StreamContent(File.Open(pbixFilePath, FileMode.Open));

                pbixBodyContent.Headers.Add("Content-Type", "application/octet-stream");
                pbixBodyContent.Headers.Add("Content-Disposition",
                                             @"form-data; name=""file""; filename=""" + pbixFilePath + @"""");


                MultipartFormDataContent requestBody = new MultipartFormDataContent(Guid.NewGuid().ToString());
                requestBody.Add(pbixBodyContent);

                HttpClient client = new HttpClient();
                client.DefaultRequestHeaders.Add("Accept", "application/json");
                client.DefaultRequestHeaders.Add("Authorization", "Bearer " + AccessToken);


                Console.WriteLine("Enviando Cubo: " + NomedoCubo);
                var response = client.PostAsync(restUrlImportPbix, requestBody).Result;

                //  Check de Sucesso
                if (response.StatusCode.ToString().Equals("Accepted"))
                {
                    Console.WriteLine("Processo de Importação efetuado com Sucesso: " + NomedoCubo);
                }
                else {
                    Console.WriteLine("Processo com erro: " + response.StatusCode);
                }
            }
            else {
                Console.WriteLine("Arquivo não encontrado." + NomedoCubo); 
            }&lt;/PRE&gt;&lt;P&gt;I´m receiving InternalServerError for all my tenant customers. It´s strange because I was using last month andit was workin percfectly. Did anyone found the same problem?&lt;BR /&gt;&lt;BR /&gt;1) I have pro license.&lt;BR /&gt;2) It was working properly.&lt;/P&gt;&lt;P&gt;3) My code is the same.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 21:04:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/response-StatusCode-500-InternalServerError/m-p/794962#M20804</guid>
      <dc:creator>brunozanoelo</dc:creator>
      <dc:date>2019-09-17T21:04:47Z</dc:date>
    </item>
  </channel>
</rss>

