I was trying to run my amazon RDS account using MS SQL server management studio, and was able to login succesfully but when using that values in web.config and loading page in browser, I am getting error as below
"Login failed. The login is from an untrusted domain and cannot be used with Windows authentication."
How Can I resolve this issue, here is my Connection string
<add name="DefaultConnection" connectionString="data source=DataSOurce;initial catalog=Demo;persist security info=True;user id=dbname;password=password;MultipleActiveResultSets=True;" providerName="System.Data.SqlClient" />
<add name="DemoEntities" connectionString="metadata=res://*/Models.DemoDBModels.csdl|res://*/Models.DemoDBModels.ssdl|res://*/Models.DemoDBModels.msl;provider=System.Data.SqlClient;provider connection string="data source=DataSOurce;initial catalog=Demo;integrated security=True; user id=dbname;password=password;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
Thanks
In your DemoEntities Connection string, you should remove Integrated Security=true to make it work.
Integrated security means simply - use your windows credentials for login verification to SQL Server, so as you have mentioned you are trying to connect to different domain rds account, it will fail, you can make your
IntegratedSecurity = false;
or remove Integrated Security=true, once you do this SQL Server will use the SQL Server login and password provided in your connection string.
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly