当我删除Migration文件夹并键入Enable-Migration并更改AutomaticMigrationEnable = true时,我正在尝试将应用程序部署到AWS。 之后,我去发布到AWS,几分钟后出现错误
Login failed for user 'DESKTOP-0L8HK6U\denni'.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_METHOD.
Failed to connect to server DESKTOP-0L8HK6U\SQLEXPRESS.
Cannot open database "MojaBaza" requested by the login. The login failed.
Login failed for user 'DESKTOP-0L8HK6U\denni'.
Amazon的连接字符串
<connectionStrings>
<add name="Jericho" connectionString="Data Source=demodb.c5sevdrlkzev.us-west-2.rds.amazonaws.com,1433;User ID=user;Initial Catalog=user;Password=user123;MultipleActiveResultSets=true"/>
</connectionStrings>
数据库连接
<connectionStrings>
<add name="Jericho" connectionString="Data Source=(localdb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Jericho.mdf; Integrated Security=True;MultipleActiveResultSets=true" providerName="System.Data.SqlClient"/>
</connectionStrings>
我不知道为什么要查找名为MojaBaza的数据库。 我在哪里犯错了?有什么帮助吗?
答案 0 :(得分:1)
检查您的rds的安全组,其中CIDR / IP-入站规则可能会更改为0.0.0.0/0,这解决了我的问题,希望它有用