The underlying provider failed on open problem solving

The provider fails on open if you use Entity Framework6 and link to MS SqlServer, whereas The local test is ok. If you use IP access, The provider fails on open. If you look it up on The Internet, someone says that The connection string is wrong, whereas The connection string is wrong, why do I successfully update The database with add-Migration and update-database commands?Why I used localhost under IIS Express, so I continued searching and found something written by a foreigner
Url here, children’s shoes are interested can go to http://th2tran.blogspot.com/2009/06/underlying-provider-failed-on-open.html
Patriotic?Don’t like reading foreign languages?Okay, I’m going to hell.
The author generally mean, he also met this problem, so to get back and forth, back and forth finally found that the EF in the operation of the database to repeatedly links, disconnect the database, if the connection string is a Windows SERVICE, rather than using a user name and password, then try to access the database user is NT AUTHORITY \ NETWORK SERVICE, this fellow permission is not big enough to cause the login failed. At the end of the story, the author tries to add that account to SQL Server and gives permission, and that’s it.
I am lazy to do the problem of new account, so, directly change to use user name and password, test again, OK.
Meow, it’s really a matter of concatenating strings.

Read More: