无法观察到“发布” .Net Core应用的VS2017中的菜单项

编程入门 行业动态 更新时间:2024-10-28 06:35:28
本文介绍了无法观察到“发布” .Net Core应用的VS2017中的菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我无法在我的.Net Core Web应用程序中观察到VS2017中的发布功能。

I'm unable to observe the "Publish" feature in VS2017 for my .Net Core web app.

我的目标是将Web服务发布到远程

My goal is to publish my web services to a remote host that runs IIS.

如何使发布菜单项显示在上下文菜单上?

推荐答案

要将ASP.NET Core应用程序部署到IIS实例,

To deploy ASP.NET Core Applications to an IIS instance,

您首先需要在服务器上下载并安装ASPNETCoreModule IIS处理程序 https:// github / dotnet / core / blob / master / release-notes / download-archives / 2.0.0-download.md#windows-server-hosting

you first need to download and install ASPNETCoreModule IIS Handler on the Server github/dotnet/core/blob/master/release-notes/download-archives/2.0.0-download.md#windows-server-hosting

这就是您的IIS启动和管理.NET Core应用程序的原因

This is what allows your IIS launch and manage your .NET Core App

完成此操作后,您需要发布您的应用程序。因此,在Web应用程序目录中,运行

When that is done, you need to "publish" your application. So from the Web Application directory, you run

dotnet publish -o C:\Temp

您还可以输入任何其他目录。只需将内容复制到服务器,它就可以正常工作

you can also enter any other Directory. Just copy the contents to the server and it should work

注意:

对于带有F#的旧版本.NET Core(1.x),您需要验证是否已配置IISHandler中间件,您可以执行 app.UseIISIntegration()之类的操作。

For older versions of .NET Core (1.x) with F#, you need to verify that you have the IISHandler middleware configured you'd do something like app.UseIISIntegration()

在某些情况下,它也没有生成 web.config 文件,您需要手动添加它们。以下是 web.config 文件

In some few cases, It also did not generate web.config files in those cases, you need to manually add them. Below is a sample of the web.config file

<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <handlers> <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/> </handlers> <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/> </system.webServer> </configuration>

更多推荐

无法观察到“发布” .Net Core应用的VS2017中的菜单项

本文发布于:2023-11-16 23:46:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1608006.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:单项   中的菜   观察到   Core   Net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!