Pages

Monday, February 8, 2010

Asp.net and SQL privileges

When a .net app stops working and it has connections to database.

eg: If the executeReader works and executenonQuery fails, it means either the user does not have write privilages or the process runs
under an identity (usually ASPNET) that only has read access
to the database. For this Right click
on the database file in Windows Explorer, go to the
Security tab, and give the ASPNET user write and modify rights to the file.