I am beginner in ASP.NET MVC. I followed one tutorial to build a simple web application. First, I created a database in SQL Server Management Studio, and I integrated it in my ASP.NET MVC app. It runs fine on my machine, but when I try to run it on another laptop it does not recognize my database.
Here's the error:
return View(db.Restoran.ToList()); // on this line
System.Data.Entity.Core.EntityException: 'The underlying provider failed on Open.'
I guess you must install SQL Server Management System in the laptop too, and create a database with the same name and login details...i hope it help.
this way it would be better as you won't have to do any changes in the code
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.