Disable server-side rendering

If the problem persists, turning off the server-side rendering feature of the Microsoft.AspNetCore.SpaServices package could also help to understand the root of the issue. To disable such feature, perform the following changes to the /Views/Home/Index.cshtml file (updated lines are highlighted):

@{
ViewData["Title"] = "Home Page";
}

@* Enable server-side rendering *@
@* <app asp-prerender-module="ClientApp/dist/main-server">Loading...</app> *@

@* Disable server-side rendering *@
<app>Loading...</app>

<script src="~/dist/vendor.js" asp-append-version="true"></script>
@section scripts {
<script src="~/dist/main-client.js" asp-append-version="true"></script>
}

As we can see, removing the asp-prerender-module tag helper is all it takes to turn off the server side prerendering feature. Doing that on a temporary basis can be useful to see if the problem lies within our application code or not: if the application is running fine without that it most likely means that our code is fine, yet our environment is experiencing some compatibility issues between the .NET Core libraries, the NPM packages and the Node.js instance.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.2.240