c# - 用户 Azure 登录失败? System.Data.SqlClient.SqlException

标签 c# model-view-controller azure

已创建 Azure 数据库和 Azure 站点。使用Azure站点提供的连接字符串并填写密码。当我尝试通过应用程序访问数据库时,返回错误

Login failed for user 'stefan'. System.Data.SqlClient.SqlException: Login failed for user 'stefan' This session has been assigned a tracing ID of '6ee9a27b-4be7-494b-aadd-7b05a8a3bddb'. Provide this tracing ID to customer support when you need assistance.

如果您访问http://clickpc.azurewebsites.net/可以自己查看错误。

我可能认为连接节点的IP在sql IP配置中被拒绝访问

我允许从 Azure 到数据库的连接,但访问似乎仍然被拒绝

最佳答案

此错误表明您的用户名/密码不正确。如果这是由于防火墙问题造成的,您将收到一条错误消息,说明如下内容:

Firewall check failed. Cannot open server 'XXXXXXXXX' requested by the login. Client with IP address 'XXXXXXXXX' is not allowed to access the server. To enable access, use the SQL Azure Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect.

通常,SQL Azure 用户名由用户名和服务器名称组成,如下所示:stefan@xxxxxxx

请确保您指定了正确的 SQL Azure 用户名和密码

关于c# - 用户 Azure 登录失败? System.Data.SqlClient.SqlException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15190187/

相关文章:

model-view-controller - 将 ActionScript 对象转换为模型

model-view-controller - 您将什么称为通用(非 GUI 相关) "Model-View-Controller"架构?

model-view-controller - 避免在 MVC 中使用大型 Controller

azure - 如何在 Azure DevOps 管道中管理构建工件?

c# - `EnumerableExecutor` 类的目的和用途是什么?

c# - MVC HttpPost 属性不起作用

azure - SAP 表连接器在 SAP ECC 6 中找不到 FM

azure - 隐藏 Azure Active Directory 登录页面中的后退按钮

c# - 在文本框上单击,显示(弹出)日历?

c# - 行号不正确的异常错误消息