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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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