我想在本地网络中部署我的 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 Management 上,我已经在端口 80 上配置了项目。 当我启动服务器时,我转到 127.0.0.1:80,我的浏览器在很长一段时间内加载了一些东西,但没有任何反应
最佳答案
解决方案是当我从 Visual Studio 2017 发布我的项目以在部署模式下选择“Self-container”时。
在 IIS 中,我选择了文件夹“publish”
关于c# - 在本地网络中部署 ASP .NET Web Core 2.0 中的项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56207021/