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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
HaiVN
Helper III
Helper III

Refresh error

Hello community,

I have a Power BI repport  which gets data from a website. I can oppdatere data from the Repport ( desktop). When I publish it to the service and try to refresh the data I get error.:
--
 DataSource.Error: The underlying connection was closed: An unexpected error occurred on a send.. https://... . The exception was raised by the IDbCommand interface. Table: ....

---

I wonder anyone can help me with this?

Thank you !

1 ACCEPTED SOLUTION

Hi @HaiVN ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @ibarrau for the prompt response.

 

Refreshing a report from the service with data directly from the web versus using a dataflow can have different implications due to the way data is handled and processed.

  • When you refresh a report that gets data directly from the web, the service needs to connect to the web source each time to fetch the latest data. This can be challenging due to various factors such as network latency, data source availability, and the complexity of the data transformations required. If the web source is slow or unreliable, it can cause the refresh process to fail or take a long time.
  • Dataflows are designed to handle data extraction, transformation, and loading (ETL) processes efficiently. When you use a dataflow, the heavy lifting of data transformations is done upstream, and the data is stored in a structured format that is optimized for quick retrieval. This means that when you refresh a report that uses data from a dataflow, the service can quickly access the pre-processed data, making the refresh process more reliable and faster.

Here are some general steps to solve the issue :

  • When you connect directly to a web data source using Web.Contents(),ensure that the data source credentials are correctly configured in the Power BI Service. Navigate to the dataset settings and look for Data Source Credentials. Edit and update them if necessary.If there are any issues with the credentials, the refresh might fail.
  • If you are using direct web connections, consider installing and configuring an on-premises data gateway. This will act as a bridge between Power BI Service and the web data source.
  • Since dataflows are working well for refreshing data in the service, consider using dataflows for all web data sources. This approach can help manage and transform the data before it reaches the Power BI report, ensuring reliable refreshes.
  • Check for any network restrictions or security settings that might be blocking the connection from Power BI Service to the web data source. Ensure that the website is accessible from the Power BI Service environment.

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Regards,

Rama U.

 

View solution in original post

10 REPLIES 10
v-venuppu
Community Support
Community Support

Hi @HaiVN ,

I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.

Thank you.

v-venuppu
Community Support
Community Support

Hi @HaiVN ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

Thank you.

v-venuppu
Community Support
Community Support

Hi @HaiVN ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Regards,

Rama U.

 

ibarrau
Super User
Super User

Hi. Depending on how you are connecting with Power Query you should do different things.

- If you are getting data like an API using web.contents() only, then you should just open the semantic model settings, find data source credentials, expand and configure the source with warning sign.

- If you are scrapping the web like using web.pages(), then it requires to install an onpremise data gateway in a VM/PC in order to work as a bridge between power bi cloud and the transformations to get the data from the web.

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

@ibarrau 

Thank you for your answer! I would like to ask you on the case where I am getting a "*.csv" file which is stored  in a website and the file is opened for all ( all can access to the file and download it) .   "  Csv.Document(Web.Contents("https://...../....csv")."

Hi. As you can see at the code, inside csv.document you have a web.contents. You can just go to the semantic model settings, look for Data Source Credentials and expand de menu to edit them. If you don't have any other source in the model, that would be enough to schedule a refresh without a gateway. If you have more sources it will depend on them too.

I hope that make sense


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

@ibarrau 
Thanh you for helps!
1- I try to make a dataflow for data set ( via the website)  and  Power BI repport get data via this dataflow. It works well with both Power BI desktop and Power BI service. I mean I can refresh  the semantic model i service or refresh the Power BI desktop repport.
2- If I get data direct from website ( not via dataflow) , it works for only Power BI desktop. I could not refresh the repport when it is published i Power service.

I do not know what is the difference between 1 & 2?

I think I'm missing the point here. Do you want to know differences about using dataflow vs power bi desktop semantic model? (theorically speaking), if so let me know.

I'll try to recap what you can do.

You can get data from source using power bi desktop (that will generate a semantic model + report). You can also get data from source using dataflow gen1 and then get data from dataflow using power bi desktop.

The desktop should be publish to service in order to share. Once in service you can configure refreshes for Dataflows or Semantic models. Both of them should have a "schedule refresh" setting. When you open it, it will show what you need to make it refresh at service. When the data is at cloud, like the example of the csv, you just need to expand data source credentials and edit them.

Regards


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

@ibarrau 
Hei,
I mean why I cannot refresh from service with report wich gets data direct from the web. But, I can refresh the reppot i service if data is getting via dataflow?

THank you!

Hi @HaiVN ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @ibarrau for the prompt response.

 

Refreshing a report from the service with data directly from the web versus using a dataflow can have different implications due to the way data is handled and processed.

  • When you refresh a report that gets data directly from the web, the service needs to connect to the web source each time to fetch the latest data. This can be challenging due to various factors such as network latency, data source availability, and the complexity of the data transformations required. If the web source is slow or unreliable, it can cause the refresh process to fail or take a long time.
  • Dataflows are designed to handle data extraction, transformation, and loading (ETL) processes efficiently. When you use a dataflow, the heavy lifting of data transformations is done upstream, and the data is stored in a structured format that is optimized for quick retrieval. This means that when you refresh a report that uses data from a dataflow, the service can quickly access the pre-processed data, making the refresh process more reliable and faster.

Here are some general steps to solve the issue :

  • When you connect directly to a web data source using Web.Contents(),ensure that the data source credentials are correctly configured in the Power BI Service. Navigate to the dataset settings and look for Data Source Credentials. Edit and update them if necessary.If there are any issues with the credentials, the refresh might fail.
  • If you are using direct web connections, consider installing and configuring an on-premises data gateway. This will act as a bridge between Power BI Service and the web data source.
  • Since dataflows are working well for refreshing data in the service, consider using dataflows for all web data sources. This approach can help manage and transform the data before it reaches the Power BI report, ensuring reliable refreshes.
  • Check for any network restrictions or security settings that might be blocking the connection from Power BI Service to the web data source. Ensure that the website is accessible from the Power BI Service environment.

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

 

Regards,

Rama U.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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