我有一个正在运行的 Web 应用程序,我想使用 FTP 将其发布到 IIS 10 服务器。
通过执行简单的发布过程,我收到此错误:
System.AggregateException: One or more errors occurred. ---> System.Exception: Publish failed due to build errors. Check the error list 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__DisplayClass40_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__108.MoveNext()
---> (Inner Exception #0) System.Exception: Publish failed due to build errors. Check the error list for more details.<---
===================
我想找出这个错误并修复它。实际上我的构建是成功的并且没有错误。但为什么我无法使用 FTP 将任何简单的网站发布到 IIS 10 服务器?
我应该在IIS服务器下启用FTP吗?但如果是这样怎么办?
欢迎任何人提供想法和直接的答案。
谢谢
最佳答案
今天,我遇到了同样的问题,刚刚遇到这个问题,发现它没有得到解答,所以我想写下我是如何解决这个错误的。
所以,可能有更多的解决方案,但就我而言,我没有传递正确的站点路径,我传递的是服务器上提到的完整路径,这导致了我上面提到的错误,为了解决这个问题,我所做的是修改了网站的完整路径,仅包含我愿意发布网站的文件夹名称。
例如,我试图传递的是发布的站点路径
字段中的路径h:\root\xx\xxxx\www\site1 Visual Studio 的向导。然后我仅将其替换为 ftp 帐户的目录名称,
我将网站的完整路径更改为 site1
,然后它开始发布网站。
关于asp.net - 使用 FTP 将 Web 应用程序发布到 IIS 10 服务器时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47749269/