在本地网络中部署 ASP .NET Web Core 2.0 中的项目

Deploy a projet in ASP .NET Web Core 2.0 in a local network

我想在本地网络中部署我的 asp net web 核心项目。我真的不知道如何让它可用。

有人知道怎么做吗?

我试图通过 Visual Studio 发布我的代码,但发生了错误。

构建步骤成功但未发布步骤。

发布时出错

日志:

System.AggregateException: One or more errors occurred. ---> System.Exception: Build failed. Check the Output window for more details.
--- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Web.Publish.PublishService.VsWebProjectPublish.<>c__DisplayClass43_0.<PublishAsync>b__2()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.ApplicationCapabilities.Publish.ViewModel.ProfileSelectorViewModel.<RunPublishTaskAsync>d__127.MoveNext()
---> (Inner Exception #0) System.Exception: Build failed. Check the Output window for more details.<---

更新

发布是可以的,但是当我想使用IIS管理和启动网站时,我的网站无法访问

更新

在IIS管理上,我已经在端口80上配置了项目。 当我启动服务器时,我转到 127.0.0.1:80,我的浏览器在很长一段时间内加载了一些东西,但没有任何反应

解决方案是当我在部署模式下将我的项目从 Visual Studio 2017 发布到 select "Self-container"。

在 IIS 中,我select编辑了文件夹 "publish"