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!

Embedded Power BI is not working

I am getting an error while trying to access embedded power bi saying connection was forcibly closed by remote host. 

 

this portal has been working smoothly for more than an year and I see this all of a sudden. Could you please look into this? please find a screen shot below for the error message.

 

 System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

 

Thanks,

Perams

 

 

 

Status: New
Comments
gabriel_hall
Regular Visitor

I have the same problem. Everything was great until today.

anuj024
New Member

I am facing same issue from last 2-3 days but getting no solution. I have Power BI pro license

tenm677
Advocate I

We are facing the same the same issue and looks like happening after this upgrade https://powerbi.microsoft.com/en-us/blog/deprecating-tls-1-0-and-1-1-support-in-power-bi/.

We had to add these url app.powerbi.com and api.powerbi.com to firewall to resolve speed issues and sign in to desktop client; however our embedded power bi reports are still not working. We are getting this error.

 

System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. --->

Perams
Advocate I

I fixed the issue by forcing TLS for power BI clients to be either 1.1 or 1.2.

 

System.Net.ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

 

Please add the above line in your embedded application. you can add this in Embed Report function in your code. This solved issue for us. It would have been nice if there was an email communication from Microsoft regarding TLS support rather than a blog so that we would have been better prepeared.

 

 

Thanks,

Harish

anuj024
New Member

I also resolved by upgrading .net framework from 4.5.2 to 4.8 and enabling TLS 1.2 on server.

tenm677
Advocate I

We have resolved opening Power BI embedded reports by adding following reg keys.

 

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727

And

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319

 

Add two values:

SystemDefaultTlsVersions - type dword, value 1

SchUseStrongCrypto - type dword, value 1

 

Restart IIS service

v-yuta-msft
Community Support

@Perams ,

 

This is a known issue as below:

Power BI rolled out enforcement of TLS 1.2 protocol for all encrypted connections in all regions. All modern web browsers (Edge, Firefox, Chrome, Safari and Internet Explorer 11) support TLS 1.2. Any customers having connection issues should ensure they are using the latest web browser of their choosing. Any client/server connections (such as API/Embedded calls, Mobile apps etc) also must support TLS 1.2 in order to maintain connection to Power BI service. Customers using Embedded applications/API's and seeing exceptions related to failed SSL connection and/or handshake failures should refer to instructions and For more information, please refer here

 

Regards,

Jimmy Tao

martinmarquez
Regular Visitor

Hi!

 

I applied Harish's solution and it works like a charm.

@Perams You saved my day.

Regards!

 

ReportsAdmin_BR
New Member

Just Add in you web/API config

 

<system.web>
<compilation debug="true" targetFramework="4.6" />
<httpRuntime targetFramework="4.6" />

<httpModules></httpModules>
</system.web>

 

KevinSGoff
Helper I

OK, I ran into this as well....I had some PBIX reports up in the cloud and was using Power BI embedded, and all has been fine for a year, until today.

 

I've read the messages here and our organization is talking about TLS 1.2, but here is something I don't get.

 

When we run our web app on our web server that calls out to Power BI in the cloud, it bombs with the same error that others are getting

 

However, I have that little demo .NET app called APPOWNSDATA, that we used to prototype the process of power BI embedded.  In our environment, that still works.   And that's what I don't quite understand???:

 

Thanks,

Kevin