2010-04-17 23:16
This is a problem when testing an ASP. NET Web site in IIS (asp.net+sql2005) My own workaround is this:
1. Open the SQL2005 Management interface (enter from the VS2005 server without installing Sqlserver2005_ssmsee.msi)
2. In the Object Explorer, expand Security under Databases, right-click the login name to pop up new login window, login to the right "search"--"advanced"-"Find Now", select "ASPNET", and successfully add user after two times " ASPNET ", below" default database "Select the database you want to manipulate (assuming the database name is: TTT), OK, ok!
3. Give the ASPNET user permission to query the database. Right-click the database for your database TTT, select "Properties"--point "permissions", and on the "OK" There are many permissions options, select the ones you commonly use, such as SELECT, Update,delete,...... Click "OK" and you're done!
Denied SELECT permission on object ' xxx ' (database ' xxx ', schema ' dbo ')