Forum Discussion
Issue with Embedded power BI report for customer
Hi Community Members,
by referring to below MS document we embedded Power report into our application for customer.
https://docs.microsoft.com/en-us/power-bi/developer/embedded/embed-customer-app
1. Rendering Power BI reports in application is one of the module, which opens embedded report on menu click.
2. My appliction is ASP.net MVC. Earlier application was in 4.5 framework, we upgraded it to 4.8 to add related assemblies which are required for embedding
3. We chose service principal route as we have Power BI Pro license
4. Application is working fine locally, rendering reports very well.
5. When I publish and host in IIS, application is working fine but when I navigate to Power BI reports it shows below error.
I am using below javascript code to open reports:
window.location.href = '/PowerBIReports/EmbedReport/?_ReportLink=' + e.itemData.ReportLink;
Message: The remote host closed the connection. The error code is 0x80070057.
Source: System.Web
Stack Trace:
at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)
at Microsoft.Owin.Host.SystemWeb.CallStreams.OutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.AspNet.SignalR.Owin.ServerResponse.Write(ArraySegment`1 data)
at Microsoft.AspNet.SignalR.Hosting.ResponseExtensions.End(IResponse response, String data)
at Microsoft.AspNet.SignalR.PersistentConnection.ProcessNegotiationRequest(HostContext context)
at Microsoft.AspNet.SignalR.PersistentConnection.ProcessRequest(HostContext context)
at Microsoft.Owin.Mapping.MapMiddleware.<Invoke>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.<RunApp>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Identity.Owin.IdentityFactoryMiddleware`2.<Invoke>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNet.Identity.Owin.IdentityFactoryMiddleware`2.<Invoke>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.<RunApp>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.<DoFinalWork>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar)
at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
------------------------------------------------------------------------------------------------------------------------------------------------
3 Replies
- AnonymousNot applicable
HI KiranghanwatMax,
Did this issue appear when you use the concatenate and redirect to the URL strings? Have you tried to use the fixed report URL to test?
In addition, you can also try to trace the fiddler to trace and confirm the detailed requests and response results to help us clarify and troubleshoot these.
How to Get Your Question Answered Quickly
Fiddler Classic | Original Web Capturing Tool for Windows (telerik.com)
Regards,
Xiaoxin Sheng
- KiranghanwatMaxNew Member
Hi Xiaoxin,
Thanks for your reply.
Doesn't seem like this issue is related to URL strings. I tried with hard coded URL as well, but no luck.
Referrred this document from MS works in exmaple, locally but not after deployed on server.
Please help me!
- AnonymousNot applicable
HI KiranghanwatMax,
Have you tried to use fiddler to trace these requests? (for example: check these requests are sent with correct contents to the corresponding path)
Fiddler Classic | Original Web Capturing Tool for Windows (telerik.com)
In addition, does any specific policy or rule enabled on your test device that may affect the request? If that is the case, you can try to use copy these codes and test them on other devices.
Regards,
Xiaoxin Sheng