Dear Sir,
I encountered the following issue when loading the PDFViewer.

This is my cshtml.
@using Syncfusion.EJ2
@section ControlsSection{
<div class="control-section">
<ejs-pdfviewer id="pdfviewer1"
serviceUrl= "/api/pdfviewer"
width="100%"
height="100%"
showNotificationDialog="true"
documentPath="Annotations.pdf"
isAnnotationToolbarOpen="true" >
</ejs-pdfviewer>
</div>
}
If I replace the "/api/pdfviewer" to "https://ej2services.syncfusion.com/production/web-services/api/pdfviewer"
then it is working but I have to load the API locally.
Below is my program.cs code
using Microsoft.Extensions.FileProviders;
using Syncfusion.Licensing;
using WebApplication11.Controllers;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllersWithViews();
if (File.Exists(Directory.GetCurrentDirectory() + "/SyncfusionLicense.txt"))
{
string licenseKey = File.ReadAllText(Directory.GetCurrentDirectory() + "/SyncfusionLicense.txt");
SyncfusionLicenseProvider.RegisterLicense(licenseKey);
}
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
app.Run();
Besides that, I tried to run your demo projects in my laptop and the pdfviewer is working well too but I can't find any difference between my project and the demo project.
Attached is my project file.
https://drive.google.com/file/d/1Wt026i-c_90e-gXkgHIKvNG54_m4Bf7A/view?usp=sharing
Regards,
WK