简体   繁体   English

是否可以将 ASP.Net Core 3.1 Web 应用程序发布为单个文件

[英]Is that possible to publish ASP.Net Core 3.1 web application as a Single File

I know that we are able to publish .Net Core 3.x console applications as a self-contained , singlefile .我知道我们能够将 .Net Core 3.x 控制台应用程序作为self-contained singlefile But is it possible to publish web application as a single file?但是是否可以将 Web 应用程序发布为单个文件?

I tried to use我试着用

<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishSingleFile>true</PublishSingleFile>

But after publishing I've got the error ANCM Application DLL Not Found .但是发布后我收到错误ANCM Application DLL Not Found My application is on .Net Core 3.1.1 .我的应用程序在.Net Core 3.1.1

How can I do that?我怎样才能做到这一点?

You should edit your webconfig to look like你应该编辑你的 webconfig 看起来像

 <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
      </handlers>

instead of代替

 <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WPF .NET Core 3.1 应用程序发布单个文件(发布)失败 - Publish Single File (Release) fails for WPF .NET Core 3.1 application asp.net 核心 3.1 web 应用程序中未显示的代码参考 - References of code not showing in asp.net core 3.1 web application ASP.NET 核心 api 项目 3.1 发布在 IIS - ASP.NET Core api project 3.1 publish on IIS 是否可以使用 Roslyn 构建 ASP.Net Core Web 应用程序? - Is that possible to build an ASP.Net Core web application using Roslyn? 在单个 ASP.NET Core 3.1 Web API 中管理两个 SPA; 一个在 root 中,另一个在“admin”路由中 - Manage two SPA in a single ASP.NET Core 3.1 Web API; One in the root and the other in “admin” route ASP.NET Core Blazor Hybrid 作为单文件应用程序 - ASP.NET Core Blazor Hybrid as single-file application 在 ASP.NET Core 3.1 Web 应用程序中获取“无法识别的 SameSiteMode 值 -1”InvalidOperationException - Getting "Unrecognized SameSiteMode value -1" InvalidOperationException in ASP.NET Core 3.1 Web Application 在 Web 部署发布到远程 IIS 后,ASP.NET Core 3.1 身份持久化 cookie 身份验证仍然失败 - ASP.NET Core 3.1 identity persist cookie authentication after web deploy publish to remote IIS still fails 如何在 asp.net 核心 3.1 mvc web 应用程序中将日志保存到数据库? - How do I save logs to database in asp.net core 3.1 mvc web application? 我应该如何保护我的 Web 应用程序(ASP.Net Core 3.1 MVC)? - How should i secure my Web Application(ASP.Net Core 3.1 MVC)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM