Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
xboneu
New Member

An existing connection was forcibly closed by the remote host

Hi!  We used to consume some Power BI Pro reports but recently, when we try to reach the PowerBI reports we get the following error: "An existing connection was forcibly closed by the remote host"

 

[SocketException (0x2746): An existing connection was forcibly closed by the remote host]
   System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult) +6723894
   System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) +57

[IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.]
   System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) +237
   System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) +15
   System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) +121

Continues....

Since we have not changed anything from our code, we thought that maybe PowerBI has changed something that prevents us to consume the reports as usual. We've searched the forum with no avail.

 

The piece of code that fails is:

-HttpClient client = new HttpClient();
-string powerBiUrl = "https://api.powerbi.com/v1.0/myorg/groups/" + ConfigurationManager.AppSettings["powerbi:WorkspaceId"...



 

I hope that someone can throw some light on it.

Thanks.

 

 

2 REPLIES 2
lbendlin
Super User
Super User

if this happens during dataset refresh it usually means that you are bombarding the data source and it gets fed up and leaves. In your case you may have run into API calls per hour limits, but normally the error message should mention that more explicitly.  Have you seen an increase in 429's in your HTTP logs?

Ibendlin, thank you for your reply.

I haven´t seen anything strange in the HTTP logs. We seldom use these reports, so I would discard the bombarding scenario. I am trying to build from scratch a small experiment app. Maybe I can see and understand what's going on and why a piece of code that hasn't been modified for months, now cannot retrieve the PowerBI reports. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.