Javascript 角度及;SPA服务:WinHttpException:与服务器的连接异常终止

Javascript 角度及;SPA服务:WinHttpException:与服务器的连接异常终止,javascript,angular,asp.net-core,single-page-application,angular-module,Javascript,Angular,Asp.net Core,Single Page Application,Angular Module,每当我将@angular/platform browser/animations库中的BrowserAnimationsDuel包含到根模块中时,就会出现以下未处理的异常。我正在使用Angular 4和Microsoft SPA服务(JavaScript服务)。 这似乎与index.cshtml文件中的asp prerender module指令直接冲突 <app asp-prerender-module="ClientApp/dist/main-server" asp-prerender

每当我将@angular/platform browser/animations库中的BrowserAnimationsDuel包含到根模块中时,就会出现以下未处理的异常。我正在使用Angular 4和Microsoft SPA服务(JavaScript服务)。 这似乎与index.cshtml文件中的asp prerender module指令直接冲突

<app asp-prerender-module="ClientApp/dist/main-server" asp-prerender-data="Options.Value">Loading...</app>
    import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { BntButtonModule } from '@bentley/angular-components';

import { sharedConfig } from './app.module.shared';
import { CLIENT_CONFIGURATION } from "./client-configuration";
import { AuthService } from './services/auth.service';
import { AuthServiceClient } from './services/auth.service.client';

@NgModule({
    bootstrap: sharedConfig.bootstrap,
    declarations: [
        ...sharedConfig.declarations
    ],
    imports: [
        BrowserModule,
        FormsModule,
        HttpModule,
        BntButtonModule,
        BrowserAnimationsModule,
        ...sharedConfig.imports
    ],
    providers: [
        ...sharedConfig.providers,
        { provide: AuthService, useClass: AuthServiceClient },
        { provide: 'ORIGIN_URL', useValue: location.origin },
        { provide: CLIENT_CONFIGURATION, useValue: (<any>window).clientAuth }
    ]
})
export class AppModule {
}
    An unhandled exception occurred while processing the request.

WinHttpException: The connection with the server was terminated abnormally
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

HttpRequestException: An error occurred while sending the request.
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

Stack Query Cookies Headers
WinHttpException: The connection with the server was terminated abnormally
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
System.Net.Http.WinHttpHandler+<StartRequest>d__103.MoveNext()
Exception: Call to Node module failed with error: ReferenceError: document is not defined
at DefaultDomRenderer2.module.exports.DefaultDomRenderer2.selectRootElement (D:\gitrepo\auth\src\Bentley.Api.Management.Angular\ClientApp\dist\vendor.js:47809:72)
at BaseAnimationRenderer.selectRootElement (D:\gitrepo\auth\src\Bentley.Api.Management.Angular\ClientApp\dist\main-server.js:10852:106)
at createElement (D:\gitrepo\auth\src\Bentley.Api.Management.Angular\ClientApp\dist\vendor.js:9483:23)
at createViewNodes (D:\gitrepo\auth\src\Bentley.Api.Management.Angular\ClientApp\dist\vendor.js:12449:44)
at createRootView (D:\gitrepo\auth\src\Bentley.Api.Management.Angular\ClientApp\dist\vendor.js:12378:5)
at Object.createProdRootView [as createRootView] (D:\gitrepo\auth\src\Bentley.Api.Management.Angular\ClientApp\dist\vendor.js:13061:12)
at ComponentFactory_.module.exports.ComponentFactory_.create (D:\gitrepo\auth\src\Bentley.Api.Management.Angular\ClientApp\dist\vendor.js:10169:46)
at ComponentFactoryBoundToModule.module.exports.ComponentFactoryBoundToModule.create (D:\gitrepo\auth\src\Bentley.Api.Management.Angular\ClientApp\dist\vendor.js:3586:29)
at ApplicationRef_.module.exports.ApplicationRef_.bootstrap (D:\gitrepo\auth\src\Bentley.Api.Management.Angular\ClientApp\dist\vendor.js:5075:57)
at D:\gitrepo\auth\src\Bentley.Api.Management.Angular\ClientApp\dist\vendor.js:4858:81