无法发布网络应用(尽管可以在本地使用) [英] Unable to Publish web app (although works locally)

查看:58
本文介绍了无法发布网络应用(尽管可以在本地使用)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法在本地计算机上正常运行,但无法发布我的Web应用.

I am unable to publish my web app although it seems to work fine on local machine.

这实际上是示例Web应用程序的部署,如https://docs.microsoft.com/en-us/aspnet/web-api/overview/data/using-web-api-with-entity所述-framework/

This is actually a deployment of the example web app as documented at https://docs.microsoft.com/en-us/aspnet/web-api/overview/data/using-web-api-with-entity-framework/

我遵循了其中的所有步骤,并设法使该应用程序在本地运行.但是我在使用部署到Azure"时遇到了麻烦链接到那里,只是导致黑屏...

I followed all the steps there and managed to get the app to work locally. But I had trouble with the "Deploy to Azure" link there, which simply led to a black screen...

当我尝试发布到Azure时,出现以下错误消息:

When I try to publish to Azure, I get the following error message:

错误 Web部署任务失败. (无法连接到远程计算机("emaths.database.windows.net").在远程计算机上,确保已安装Web Deploy和所需的进程("Web 管理服务")启动.了解更多信息http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.

Error Web deployment task failed. (Could not connect to the remote computer ("emaths.database.windows.net"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started.  Learn more http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.

一定与命名有关吗?还是我想念的简单事情?我已经尝试删除/重新命名并重新启动很多次了,但是没有运气.我已经包括了Visual Studio和Azure的详细信息.有经验的人可能会 能够快速解决此问题...(非常感谢)

Must be something to do with the naming? Or something simple I've missed? I have tried deleting/renaming and restarting many times now however with no luck ... I have included detail from both Visual Studio and Azure. An experienced person will probably be able to solve this quickly... (Many thanks)

在Visual Studio的Web部署中,服务器输入为emaths.database.windows.net,并且在天蓝色下,我有一个名为emaths的资源组,其状态为在线".和服务器名称为'emaths.database.windows.net

In web deploy in Visual Studio the server is entered as emaths.database.windows.net, and at azure I have a resource group named emaths with a status of "online" and a server name of emaths.database.windows.net

错误日志如下:

28/12/2018 23:28:35
System.AggregateException:发生一个或多个错误. ---> System.Exception:由于构建错误,发布失败.检查错误列表以获取更多详细信息.
    ---内部异常堆栈跟踪的结尾---
    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
    at System.Threading.Tasks.Task.Wait(Int32毫秒超时,CancellationToken cancelledToken)
   在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()
---从之前引发异常的位置开始的堆栈跟踪---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)
    at Microsoft.VisualStudio.ApplicationCapabilities.Publish.ViewModel.ProfileSelectorViewModel.< RunPublishTaskAsync&d; d__108.MoveNext()
---> (内部异常#0)System.Exception:由于生成错误,发布失败.检查错误列表以获取更多详细信息.< ---

28/12/2018 23:28:35
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.<---


推荐答案

Caleb,

Hi Caleb,

基于该错误,您似乎正在尝试将Web应用程序发布到SQL Server. Visual Studio应该尝试连接的端点是您我们的appname.scm.azurewebsites.net.

Based on the error it looks like you are trying to publish the web app to the SQL server. The endpoint that visual studio should be trying to connect to is your we appname.scm.azurewebsites.net.

如果要创建新的Web应用程序,请参考此处的说明,否则请确保选择现有的Web应用程序(如果已存在)并使用发布界面. https://docs.microsoft.com/zh-CN/azure/app-service/app-service-web-get-started-dotnet#create-an-app-service-plan

If you are creating a new web app reference the instructions from here otherwise make sure to select an existing web app if one already exists and flow the publish interface. https://docs.microsoft.com/en-us/azure/app-service/app-service-web-get-started-dotnet#create-an-app-service-plan


这篇关于无法发布网络应用(尽管可以在本地使用)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆