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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
SorenHElisa
Helper I
Helper I

Web page as datasource automatic refresh error The module named 'Html' has been disabled...

Hi,

 

PBIRS problem:

User wanted to use a web page as source for their report. Web page do not require any authentication. Desktop working fine and reloads the data. Report server's automatic data refresh throws the following error:

 

Data source error: Login failed for data source ‘Unknown’.

 

When clicking the [i] after error message, the following is shown:

essionID: 3ed14127-ea01-441f-a849-ca66d74c4755
[0] -1055784932: Expression.Error: The module named 'Html' has been disabled in this context.. . The exception was raised by the IDbCommand interface.

 

from RSPowerBI_<>.log file:

 

2022-10-27 08:49:01.0640|ERROR|96|Error Processing Data Model Refresh: SessionId: 3ed14127-ea01-441f-a849-ca66d74c4755, Status: Error Failed to refresh the model, Exception Microsoft.AnalysisServices.OperationException: Failed to save modifications to the server. Error returned: 'Expression.Error: The module named 'Html' has been disabled in this context.. . The exception was raised by the IDbCommand interface.
'.
at Microsoft.AnalysisServices.Tabular.Model.SaveChangesImpl(SaveOptions options)
at Microsoft.PowerBI.ReportServer.AsServer.TOMWrapper.RefreshModel(Database database)
at Microsoft.PowerBI.ReportServer.AsServer.AnalysisServicesServer.RefreshDatabase(String databaseName, IEnumerable`1 dataSources, IEnumerable`1 parameters, String clientSessionId)
at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.AnalysisServicesDataRefresh.RefreshDatabase(AsDatabaseInfo asDatabaseInfo)
at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.<>c__DisplayClass34_0.<ExecuteActionWithLogging>b__0()
at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.<ExecuteFuncWithLogging>d__33`1.MoveNext()
2022-10-27 08:49:01.1161|ERROR|96|Error Processing Data Model Refresh: SessionId: 3ed14127-ea01-441f-a849-ca66d74c4755, Status: Error Failed Data Refresh, Exception Microsoft.AnalysisServices.OperationException: Failed to save modifications to the server. Error returned: 'Expression.Error: The module named 'Html' has been disabled in this context.. . The exception was raised by the IDbCommand interface.
'.
at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.ExecuteActionWithLogging(Action methodToExecute, String description, String localizedDescription, String messageInFailure, RefreshInfo refreshInfo, DataAccessors dataAccessors, ReportEventType operation, Boolean isDataRetrieval, Boolean showInExecutionLog, Boolean sendToTelemetry)
at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.AnalysisServicesDataRefresh.RefreshData(RefreshInfo refreshInfo)
at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.<>c__DisplayClass34_0.<ExecuteActionWithLogging>b__0()
at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.<ExecuteFuncWithLogging>d__33`1.MoveNext()

 

 

M Query code in use:

 

let
    Source = Web.Page(Web.Contents("https://www.worldometers.info/coronavirus/")),
    Data2 = Source{2}[Data],
    #"Changed Type" = Table.TransformColumnTypes(Data2,{{"#", Int64.Type}, {"Country, Other", type text}, {"Total Cases", type text}, {"New Cases", type number}, {"Total Deaths", type text}, {"New Deaths", type number}, {"Total Recovered", type text}, {"New Recovered", type text}, {"Active Cases", type text}, {"Serious, Critical", type number}, {"Tot Cases/ 1M pop", type number}, {"Deaths/ 1M pop", type text}, {"Total Tests", type text}, {"Tests/ #(lf)1M pop", type text}, {"Population", type text}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([#"Country, Other"] <> "Total:"))
in
    #"Filtered Rows"

 

 

PBIRS version:

Version1.15.8300.38452(September 2022)

 

Also happening in version:

Version1.13.8054.40631(January 2022)

 

All other datasources in use (like ODBC, Oracle, SSAS) are working as expected.

 

Is the functionality disabled in some config files? A bug in PBIRS?

 

Best regards,

Sören

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @SorenHElisa ,

 

Power BI Report Server has a limitation when using web data: only data files from web can be refreshed. Data based on Page or By example aren't refreshable. This limitation is because the M expressions created with Web.BrowserContents and Web.Page can't be refreshed. Power BI Report Server can only refresh Web.Contents data sources.

For more details, you can read below:

Power BI report data sources in Power BI Report Server - Power BI | Microsoft Learn


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

View solution in original post

5 REPLIES 5
pabeader
Post Patron
Post Patron

Here is an actual solution to this issue.  

 

Open Power BI Desktop.  Use that to make the initial connection to the WEB data you are trying to refresh.

Once you have a usable table of the data you are trying to use, copy that query.

 

Open Power BI Report Server version and paste the query into the RS version.

Go into Advanced Editor and make these changes.

Change  Web.BrowserContents  to  Web.Contents

If you are replacing an existing web connection, adjust the following step to be #"Extracted Table From Html" instead of what is currently says.

You will now have a refreshable version of the WEB connection.

Thank you for you comment, but I can't see how this is any different from developing in PBIRS version directly. It will use the Web.Contents -function in PBIRS Desktop also when developing from scratch and the exact same code after that. It's not Power BI Desktop for RS that is having problems, it's the server. 

 

Best regards, 

Sören

It's not the server.  It's Microsofts decision to disable the HTML driver. 

If you try it you will see that PBIRS and PBI create different M code for the WEB connection. 

The one in PBI is close and only needs a few tweaks to be made useable.

 

My workaround allows you to still update your WEB based data.

 

 

v-henryk-mstf
Community Support
Community Support

Hi @SorenHElisa ,

 

Power BI Report Server has a limitation when using web data: only data files from web can be refreshed. Data based on Page or By example aren't refreshable. This limitation is because the M expressions created with Web.BrowserContents and Web.Page can't be refreshed. Power BI Report Server can only refresh Web.Contents data sources.

For more details, you can read below:

Power BI report data sources in Power BI Report Server - Power BI | Microsoft Learn


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

Hi,

 

Thanks Henry for pointing out this. I had completely missed the footnote regarding restrictions on web content. 

 

Have a great day,

Sören

 

Note to self: never skip footnotes, although they seem not to concern the actual problem.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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