【发布时间】:2016-01-26 00:45:09
【问题描述】:
我无法从 Azure 网站访问 SQL Azure DB,即使本地网站上的连接字符串相同。错误如下:
System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'XYZ'.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,
Boolean breakConnection, Action`1 wrapCloseInAction) at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj,
Boolean callerHasConnectionLock, Boolean asyncClose) <...>
Error Number:18456,State:1,Class:14 <...>
查看之前的答案后,
- 我已将我的数据库添加到 Azure 门户上我网站的链接资源中。
-
我已将 0.0.0.0 - 255.255.255.255 范围添加到我的防火墙排除列表中不需要! - 我已确保我的连接字符串使用不允许任何ambiguity。
- 我已确定
ApplicationDbContext是使用correct connection string 构建的。
我还能尝试什么?
网站代码是here。
【问题讨论】:
标签: c# azure razor azure-storage azure-web-app-service