ASP.NET core3.1 of Razor Page + SPA encountered in trying to pit

As a programmer wild, a little while ago just know Ant Design Pro so fast hardware thing, really want to use ah.

Running system use Razor Page wrote, too, can not be changed all at once SPA mode, can only be a little bit.

For various reasons, do not achieve the two servers, so you want to get SPA Razor Page and go.

After the customer service difficulties, and finally to the

https://docs.microsoft.com/zh-cn/aspnet/core/client-side/spa/react?view=aspnetcore-3.1&tabs=visual-studio#run-the-cra-server-independently

This step,

spa.UseProxyToSpaDevelopmentServer("http://localhost:3000");

This step loud noise also make life difficult, HTTP500 stop error occurs.

If you use the new template React pedestal, then no problem, come to me can not.

Line by line comments, testing, and finally found a problem with this line:

app.UseBrowserLink();

Microsoft.VisualStudio.Web.BrowserLink this SPA package and there is a conflict, you can clean out.

I do not know what will be behind the pit. . .

Guess you like

Origin www.cnblogs.com/wzhao666/p/12620858.html