Message: Sys.WebForms.PageRequestManagerServerErrorException: Cannot open database "[DB_NAME]
Just follow these simple steps to solve the problem.
1. Open SQL Server Management Studio.
2. On the left menu, expand Security then Logins. Check if 'NT AUTHORITY\IUSR' exists. If not then that is the cause of the problem.
3. Right-click on Logins then click New Login...
4. On the General page, click Search...
5. On the next popup window, click Advanced...
6. Then on the following window, click Find Now and find IUSR on the Search Results. Then click OK.
7. Back on the left menu, you'll now see the 'NT AUTHORITY\IUSR' user. Right click on it and click Properties.
8. On the Server Roles page, check on sysadmin.
9. Then on the User Mapping page check on the database name you need access to; and below that on the database role membership make sure to also check on db_owner then click OK.
...And that's a wrap, you shouldn't be seeing the login failed error now.
-k














