小编Las*_*r42的帖子

Rotativa 使用 Windows 身份验证获取 401.2 代码状态

我有一个使用 Windows 身份验证的 MVC 5 项目。为了添加 pdf 导出支持,我​​尝试设置 Rotativa lib。第一次尝试是Controller方法

public ActionResult PrintViewToPdf()
{
    return new ActionAsPdf("myAction");
}
Run Code Online (Sandbox Code Playgroud)

这会导致 pdf 文件中出现错误 401.2 页面。据我了解(请让我知道是否有其他解决方案!!!),有唯一的解决方法:

public ActionResult PrintViewToPdf()
{
    return new ViewAsPdf("myView");
}
Run Code Online (Sandbox Code Playgroud)

在这种情况下,我得到一个 pdf 文件,但它内容是一个没有完成 javascript 脚本的网页!

那么,问题是:除了替换之外还有其他解决方案ActionAsPdfViewAsPdf?如果不是,是否可以包含ViewAsPdfjavascript 执行结果?

http-status-code-401 rotativa asp.net-mvc-5

5
推荐指数
0
解决办法
477
查看次数

VS2019 错误 TS2300:重复标识符 IteratorResult

我有一个 ASP.NET Core 项目,里面有 Angular App。将项目更新到 .NET Core 3.0 版本后,我遇到了一个问题。在 ASP.NET Core 项目构建期间,我在输出中看到 2 个错误:

1>------ Build started: Project: Portal, Configuration: Debug Any CPU ------
1>C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.6\lib.es2015.iterable.d.ts(41,6): error TS2300: Build:Duplicate identifier 'IteratorResult'.
1>D:\Solution\MyProject\ClientApp\node_modules\@types\node\index.d.ts(73,11): error TS2300: Build:Duplicate identifier 'IteratorResult'.
1>MyProject -> D:\Solution\MyProject\bin\Debug\netcoreapp3.0\Portal.dll
1>Done building project "Portal.csproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Run Code Online (Sandbox Code Playgroud)

包.json:

{
  "name": "client-app",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint", …
Run Code Online (Sandbox Code Playgroud)

build asp.net-core angular visual-studio-2019

5
推荐指数
1
解决办法
9321
查看次数