已创建 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/