App Muncher

Issues faced - solutions identified - shared with community.

This error was thrown while running a site using IIS 8

Exception Details: System.Data.SqlClient.SqlException: Cannot open database “myTEST_db” requested by the login. The login failed. Login failed for user ‘IIS APPPOOL\DEFAULTAPPPOOL.


The error occurred when browser requests a page. It is sent to IIS, IIS sends requests to SQL SERVER with this ACCESS NAME which do not have credentials to access the specified database.

To overcome this issue, give permissions for the user to that particular database as follows:

In SQL management studio, expand SECURITY, expand LOGINS, select the required node and open Properties





















Select USER MAPPING, select the required database and check database role DB_OWNER.























This solved the issue.


If the required Login is not listed in SECURITY-->LOGINS, then right-click LOGINS and select option NEW LOGIN.... and create one.

1 comment:



  1. It is useful to learn how to set and reset a error.Thank you author for posting this kind of error.

    http://www.wikitechy.com/fix-error/login-failed-for-user


    Both are really good.
    Cheers,
    Venkat

    ReplyDelete

| Designed by AppMuncher