VS MVC5 code first project. The login failed. Does any one have any insight on this question? Joe Joe 3, 6 6 gold badges 33 33 silver badges 59 59 bronze badges. If so, try connecting to both databases using windows authentication. If you can without access errors it's something code related. Add a comment. Active Oldest Votes. Community Bot 1 1 1 silver badge. I'm working with VS and EF6. Delete the database files. Delete Migration Folder from your application. Delete any database connection to that database from server Explorer data connections.
Run "sqllocaldb. Delush Delush 97 2 2 silver badges 8 8 bronze badges. Fixed My issue! Thank you. SchoolContext add-migration Initial update-database. The issue appears due to an invalid Database Initialisation in the example. Change public class SchoolInitializer : System. Daniil Ivanov Daniil Ivanov 2 2 silver badges 7 7 bronze badges. I had the same error when I was going through that tutorial.
For those who are still in the initial steps, all you have to do is to disconnect the LocalDb in the Server Explorer to be able to see the new email column in the Student table. In your web application settings, in connection strings, you can check which connection string is effectively used by your application.
In my case, regardless of the publish wizard settings I used, this connection string was wrong. I just deleted and created it again using my database username and password and everything works again.
I struggled for 2 days to figure out why I'm getting a "Login failed for user 'null'" error message even though my connection string is correct and I'm able to connect to the DB server via SSMS. Turns out I tried to remove connection string in Application Settings in my Azure account.
I came across the same error message but solved it in a different way. My big problem with creating a new database was that when I created a new web app for azure from Visual Studio Solutions, it requests of you to create a new username and password for that database. Or you can find out what your existing azure server password is and make sure the new one is no different. Sign up to join this community.
The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Asked 5 years, 7 months ago. Active 5 years ago. Viewed 18k times. But it still works on debug and on SSMS but not on production. Improve this question. Community Bot 1. Ricker Silva Ricker Silva 1 1 gold badge 2 2 silver badges 7 7 bronze badges.
Which is failing because of delegation. On the sql side the Service principal name needs to be setup correctly. The user is not associated with a trustd SQL Server connection. From the same client computer I can connect using windows authentication to 2 other SQL Boxes all on the same domain but all in different remote offices, eg difference sub nets I guess.
I suspect I have circumnavigated a wider issue to do with the network DNS or similar, but this worked for me. Hope it helps.. Sign in. United States English. Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums.
SQL Server Security. Sign in to vote. I have checked and upgraded my version of MDAC to match the server version 2. Thanks Ian. Tuesday, October 24, PM. Thanks Laurentiu. Thursday, October 26, PM. Hi Ian, I am suspecting that you are using local windows accounts. Thanks, Bala. No were are using domain accounts - sorry I didn't make this clear.
Both the server and workstation and users belong to the same domain. Wednesday, October 25, AM. Wednesday, October 25, PM. I think that the group policy may be preventing this type of connection and will speak to the people involved regarding this I can have local admin permissions but can't change the group policies Thanks for your help Ian.
0コメント