Hi,
I recently stumbled on this problem. After 10 hours of trying various options, I could isolate the solution to this issue.
Configuration:
Windows XP Professional, SQL Server 2005, SQL Server Express 2005, Visual Studio .Net 2005, Visual Web Developer.
Solution:
Initially, I added 'machinename/ASPNET' as user to SQL Server Express database engine. I also added it as a user to my application database. However, it did not work. Utlimately I removed 'machinename/ASPNET 'user from database engine as well as application database.
I checked the user ASPNET alongwith the Groups it belonged to. And there was the problem.
So I added ASPNET as a member of SQLServer2005MSSQLUser$server$SQLExpress. And it worked. I could reproduce the issue by removing it from the group again.
Steps (Windows XP):
Go to Control Panel -> Administrative Tools -> Computer Management -> Local Users and Groups -> Users -> ASPNET
Right Click on ASPNET and select Properties
Go to Member Of tab.
Click on Add -> Advanced -> Find Now
Select SQLServer2005MSSQLUser$<machinename>$SQLExpress
Click on Ok -> Ok - >Apply
Close all the windows and reboot your machine. It should work now.