I am using the Syncfusion.Blazor.PDFViewerServer nuGet package and am having an issue with opening a pdf file. Every time I get an error as per the below :-
Error: Microsoft.JSInterop.JSException: Could not find 'sfBlazor.throwError' ('throwError' was undefined).
Error: Could not find 'sfBlazor.throwError' ('throwError' was undefined).
at https://localhost:44392/_framework/blazor.server.js:1:67714
at Array.forEach (<anonymous>)
at e.findFunction (https://localhost:44392/_framework/blazor.server.js:1:67674)
at v (https://localhost:44392/_framework/blazor.server.js:1:69416)
at https://localhost:44392/_framework/blazor.server.js:1:70362
at new Promise (<anonymous>)
at e.beginInvokeJSFromDotNet (https://localhost:44392/_framework/blazor.server.js:1:70335)
at https://localhost:44392/_framework/blazor.server.js:1:26442
at Array.forEach (<anonymous>)
at e.invokeClientMethod (https://localhost:44392/_framework/blazor.server.js:1:26412)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Syncfusion.Blazor.Internal.SyncfusionInterop.Init[T](IJSRuntime jsRuntime, String elementId, Object model, String[] events, String nameSpace, DotNetObjectReference`1 helper, String bindableProps, Dictionary`2 htmlAttributes, Dictionary`2 templateRefs, DotNetObjectReference`1 adaptor, String localeText)
at Syncfusion.Blazor.BaseComponent.OnInitRenderAsync()
at Syncfusion.Blazor.BaseComponent.InitComponent()
at Syncfusion.Blazor.BaseComponent.OnAfterRenderAsync(Boolean firstRender)
at Syncfusion.Blazor.PdfViewer.PdfViewerBase.OnAfterRenderAsync(Boolean firstRender)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
I have attached a sample solution that generates the error. I cannot get to the bottom of the error?
|
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddSyncfusionBlazor(option => { option.IgnoreScriptIsolation = true; });
services.AddServerSideBlazor();
services.AddSingleton<WeatherForecastService>();
services.AddServerSideBlazor().AddHubOptions(o => { o.MaximumReceiveMessageSize = 102400000; });
} |