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

Follow these directions to fix error 'Cannot open database requested by the login" in Visual Studio.

  1. Sign into SQL Server Management Studio (SSMS) using Windows Authentication.
  2. In Object Explorer, expand Security.
  3. Right-click on the Logins folder and select New Login.
  4. In the Login - New pop-up box, type IIS APPPOOL\\ASP.NET v4.0 in the Login name field.
  5. Select User Mapping. Check-mark the databases being used in Visual Studio, and also check-mark db_reader and db_writer.
  6. Select OK.

Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter cc9e6 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |