简体   繁体   English

将 .NET 核心控制台应用程序部署到 Azure 后加载我的 web 应用程序时出错

[英]Error loading my web app after deploying .NET Core console app to Azure

My app is running locally without any issue but when I try to run it from Azure console I have the following error:我的应用程序在本地运行没有任何问题,但是当我尝试从 Azure 控制台运行它时,出现以下错误:

An error occurred while starting the application.启动应用程序时出错。 SqlException: Cannot open server 'Server-name' requested by the login. SqlException:无法打开登录请求的服务器“服务器名称”。 Client with IP address 'wxyz' is not allowed to access the server. IP 地址 'wxyz' 的客户端不允许访问服务器。 To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range.要启用访问,请使用 Windows Azure 管理门户或在 master 数据库上运行sp_set_firewall_rule以为此 IP 地址或地址范围创建防火墙规则。 It may take up to five minutes for this change to take effect.此更改最多可能需要五分钟才能生效。 Microsoft.Data.ProviderBase.DbConnectionPool.CheckPoolBlockingPeriod(Exception e)

SqlException: Cannot open server 'server-name' requested by the login. SqlException:无法打开登录请求的服务器“服务器名称”。 Client with IP address 'ip' is not allowed to access the server. IP 地址 'ip' 的客户端不允许访问服务器。 To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule要启用访问,请使用 Windows Azure 管理门户或运行 sp_set_firewall_rule

I have added IP in firewall setting on azure portal still the issue is happening我在 azure 门户的防火墙设置中添加了 IP 问题仍然存在

This error was caused because your IP was not added in the SQL server tab(azure portal).此错误是因为您的 IP 未添加到 SQL 服务器选项卡(Azure 门户)中。 So you must add the IP address of your SQL Server on Azure portal所以你必须在Azure入口添加你的SQL服务器的IP地址

You have to update the settings of the "Firewalls and virtual.networks" of your SQL Server.您必须更新 SQL 服务器的“防火墙和虚拟网络”设置。

Browse to your SQL Server, add the IP address and allow other azure services and resources to access the server.浏览到您的 SQL 服务器,添加 IP 地址并允许其他 azure 服务和资源访问该服务器。 Refresh and wait at least 5 minutes before trying again.刷新并等待至少 5 分钟,然后重试。

I also had my ubuntu server firewall blocking my request once, so be sure your webserver is not responsible.我的 ubuntu 服务器防火墙也阻止了我的请求一次,因此请确保您的网络服务器不负责。

Have you tried enabling this setting?您是否尝试过启用此设置? 在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure 部署ASP.Net后服务应用不可用 Web 核心应用 - Azure Service App Becomes Unavailable After Deploying ASP.Net Web Core App 从 .NET 核心 2.2 迁移到 .NET 5 后,应用程序在部署到 azure 应用程序服务后无法启动 - 启动超时 - After migration from .NET core 2.2 to .NET 5 the application won't start after deploying to azure app service - startup timeout Azure Web 应用程序与 Linux 并将 GLIBC 2.29 与我的 ASP.NET Core 7 应用程序捆绑在一起 - Azure Web App with Linux and bundling GLIBC 2.29 with my ASP.NET Core 7 App 如何配置.NET 7 Web API部署到Azure应用服务 - How to configure .NET 7 Web API for deploying to Azure App service 带有数据库的 ASP.Net Core Web 应用程序使用 Visual Studio 2019 发布到 Azure - 实体框架迁移错误 - ASP.Net Core Web App with Database publish to Azure with Visual Studio 2019 - Error with Entity Framework Migrations 仅在部署到 Azure Web 应用程序后才反应 JS 应用程序路由问题 - React JS App Routing Issue Only After Deploying to Azure Web App 迭代推送数据到 Azure Search Index VIA .NET Core console app - Iteratively push data to Azure Search Index VIA .NET Core console app 将 Python Function 应用程序部署到 Azure 时出错 - Error while deploying a Python Function app to Azure 从 .NET 访问 DB Core Web API 部署为 Azure Web App - Access DB from .NET Core Web API deployed as Azure Web App 如何读取Service Fabric Azure App Configuration ASP.NET Core Stateless Web API? - How to read the Azure App Configuration in Service Fabric ASP.NET Core Stateless Web API?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM