部署ASP.NET Core [英] Deploying ASP.NET Core
问题描述
我已经构建了最简单的ASP.NET Core网站来尝试和部署。它甚至没有返回错误。
I've built the simplest ASP.NET Core website to try and deploy. It isn't even returning an error.
IIS将返回.HTM页面,以便感觉良好
IIS will return a .HTM page so that feels OK
我安装了.Net Core Windows Server主机
I've installed .Net Core Windows Server hosting
我使用文件夹部署并将文件夹放在c:\inetpub \wwwroot
I used a folder deploy and put the folder under c:\inetpub\wwwroot
我设置了应用程序池.Net v4 [我也尝试过无托管代码]
I set the Application Pool .Net v4 [I've also tried No Managed Code]
我将应用程序添加到默认网站
I added the application to the Default website
还有什么?
更新:感谢Win我发现了这一点:
UPDATE: Thanks to Win I found this out:
错误:
未找到应用程序依赖项清单(razortest.deps.json)中指定的程序集:
package:'Microsoft.ApplicationInsights.AspNetCore',version:'2.1 .1'
路径:'lib / netstandard1.6 /Microsoft.ApplicationInsights.AspNetCore.dll'
当使用以下目标清单文件发布应用程序时,此程序集应位于本地运行时存储中:
aspnetcore-store-2.0.0-linux-x64.xml; aspn etcore-store-2.0.0-osx-x64.xml; aspnetcore-store-2.0.0-win7-x64.xml; aspnetcore-store-2.0.0-win7-x86.xml
Error: An assembly specified in the application dependencies manifest (razortest.deps.json) was not found: package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1' path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll' This assembly was expected to be in the local runtime store as the application was published using the following target manifest files: aspnetcore-store-2.0.0-linux-x64.xml;aspnetcore-store-2.0.0-osx-x64.xml;aspnetcore-store-2.0.0-win7-x64.xml;aspnetcore-store-2.0.0-win7-x86.xml
所以我要么错过了一个文件,要么指向错误的文件 - 但是在VStudio或服务器上????
So I'm either missing a file or pointing to the wrong one - but in VStudio or on the server????
推荐答案
查看文档这里
- 您需要发布您的网站,然后将IIS网站指向已发布的文件夹
- 应用程序池必须设置为
无托管代码
- 应用程序池标识用户
IIS AppPool \ {AppPoolName}
必须对已发布的网站文件夹具有读取权限
- You need to publish your website and then point IIS website to the published folder
- Application pool must be set to
No Managed code
- Application Pool identity user
IIS AppPool\{AppPoolName}
must have read permissions on the published website folder
这篇关于部署ASP.NET Core的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!