Forum Discussion

francotiveron's avatar
francotiveron
Regular Visitor
9 years ago
Solved

Trying to embed a PowerBI report in a WebSharper Client Server F# application

I started from the downloaded PowerBIEmbedded_AppOwnsData C# razor demo, which works as expected. Then I tried to do the same starting with a WebSharper project, but didn't have success so far. The p...
  • francotiveron's avatar
    9 years ago

    Finally I found that adding a redirection to web.config fixes the issue:

     

    <configuration>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
                <bindingRedirect oldVersion="0.0.0.0-4.4.1.0" newVersion="4.4.1.0" />
          </dependentAssembly>
    
          <!-- Manual add BEGIN -->
          <dependentAssembly>
            <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
              <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
          </dependentAssembly>
          <!-- Manual add END -->
    
        </assemblyBinding>
      </runtime>
      <system.web>
      <!-- NOTE: remove debug="true" to serve compressed JavaScript -->
        <compilation debug="true" targetFramework="4.0" />
        <httpRuntime targetFramework="4.0" />
      </system.web>
      <system.webServer>
        <modules>
          <add name="WebSharper.RemotingModule" type="WebSharper.Web.RpcModule, WebSharper.Web" />
          <add name="WebSharper.Sitelets" type="WebSharper.Sitelets.HttpModule, WebSharper.Sitelets" />
        </modules>
     </system.webServer>
    </configuration>