The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Community,
I have a somewhat exciting setup:
* Server 1: The PBI Reporting Service is installed on a machine behind a firewall
* Server 2: There's a Load Balancer receiving requests from outside the DMZ with a URL
On Server 1 I have installed another web-app with IIS. This is the main webservice. The main webservice is installed as the Default Website receiving the binding from the URL.
The PBI Reporting Service is also installed on that same machine. I want to route the requests from www.url.com/Reports to the local server 10.1.2.3.123... I used a URL rewrite to accomplish this:
<system.webServer>
<rewrite>
<rules>
<rule name="ReverseProxyInboundRule1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://10.1.2.123/Reports/{R:1}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
</system.webServer>
When calling www.url.com/Reports the web server shows the Power BI framework. However, in the console there are some errors:
Failed to load resource: the server responded with a status of 401 (Unauthorized)
manifest.json:1 Manifest: Line: 1, column: 1, Syntax error.
Refused to apply style from 'www.url.com/Reports/api/v2.0/SafeGetSystemResourceContent(type='UniversalBrand',key='stylesheet')' because its MIME type ('application/octet-stream') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
/Reports/api/v2.0/System/Properties?properties=MaxFileSizeMb,ShowDownloadMenu:1 Failed to load resource: the server responded with a status of 400 (Bad Request)
Solved! Go to Solution.
I solved the issue:
* Add an application in Default Website
* Add the following mod-rewrite rules to the config that resides inside the location path:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="ReverseProxyInboundRule1" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="http://localhost/Reports/{R:1}" appendQueryString="true" />
</rule>
<rule name="ReverseProxyInboundRule2" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{CACHE_URL}" pattern="^(https?)://" />
</conditions>
<action type="Rewrite" url="{C:1}://localhost/Reports/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
I solved the issue:
* Add an application in Default Website
* Add the following mod-rewrite rules to the config that resides inside the location path:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<clear />
<rule name="ReverseProxyInboundRule1" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="http://localhost/Reports/{R:1}" appendQueryString="true" />
</rule>
<rule name="ReverseProxyInboundRule2" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{CACHE_URL}" pattern="^(https?)://" />
</conditions>
<action type="Rewrite" url="{C:1}://localhost/Reports/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>