Visual Studio - Resolve "Cannot open database requested by the login"

by
Jeremy Canfield |
Updated: March 12 2020
| Visual Studio articles
Follow these directions to fix error 'Cannot open database requested by the login" in Visual Studio.
- Sign into SQL Server Management Studio (SSMS) using Windows Authentication.
- In Object Explorer, expand Security.
- Right-click on the Logins folder and select New Login.
- In the Login - New pop-up box, type IIS APPPOOL\\ASP.NET v4.0 in the Login name field.
- Select User Mapping. Check-mark the databases being used in Visual Studio, and also check-mark db_reader and db_writer.
- Select OK.
Did you find this article helpful?
If so, consider buying me a coffee over at