You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure Functions部署失败,报错ERROR_CONNECTION_TERMINATED求协助

Troubleshooting Azure Functions Deployment Failure in Visual Studio

Hey there, sorry to hear you're stuck with this frustrating deployment issue—let's break down some actionable steps to get this sorted out, since you've already followed the tutorial and ruled out Fiddler interference.

Potential Fixes to Try

  • Verify Azure Account Permissions & Deployment Credentials
    Make sure the Azure account you're signed into in Visual Studio has Owner or Contributor permissions on your target Function App. Sometimes stale or incorrect deployment credentials can block deployments:

    • Head to the Azure Portal, navigate to your Function App > Deployment Center > FTP/Credentials
    • You can reset the deployment credentials here, then go back to Visual Studio, re-authenticate your Azure account, and try deploying again.
  • Clear Visual Studio's Deployment Cache
    Corrupted local deployment cache is a common culprit. Delete these cache folders to start fresh:

    • %LOCALAPPDATA%\Microsoft\VisualStudio\<your VS version>\WebSiteCache
    • %LOCALAPPDATA%\Microsoft\VisualStudio\<your VS version>\Publish
      Restart Visual Studio after deleting the folders, then attempt deployment again.
  • Check Function App Configuration & Status
    Log into the Azure Portal and confirm:

    • Your Function App is in the Running state (not stopped or disabled)
    • If you have WEBSITE_RUN_FROM_PACKAGE set to 1 in Configuration > Application Settings, temporarily change it to 0 for the deployment—you can switch it back once deployment succeeds. This setting can interfere with Web Deploy.
  • Test Deployment via Azure CLI
    To rule out Visual Studio-specific issues, try deploying manually with Azure CLI:

    1. In Visual Studio, right-click your Function App project > Publish > Select Create Package to generate a deployment zip file.
    2. Run this command (replace placeholders with your details):
      az functionapp deployment source config-zip --resource-group <your-resource-group> --name <your-function-app-name> --src <path-to-your-zip-file>
      

    If this works, the problem is likely with Visual Studio's deployment setup; if it fails, the issue is on the Azure side (like permissions or app configuration).

  • Enable Detailed Deployment Logs
    Get more granular error details by enabling verbose logs in Visual Studio:

    • Open the Publish window for your project > Go to Settings > Under Deployment Logs, select Detailed
    • Run the deployment again and check the full log output—look for specific error codes (like 401/403 for permissions, 500 for server issues) that can pinpoint the exact problem.

内容的提问来源于stack exchange,提问作者Narendra Jangir

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 08:39:47