I'm not sure I know how to explain this, so please bear with me :-)
I have a .NET web app backed by an SQL Express 2008 database. All of my queries, inserts and updates work fine. I've also set up a few server-side reports, and can access those fine via an aspx page. The problem is that if I access any page that queries
the DB before going to the reports, the reports will not work. Conversely, if I relauch the app and go the reports first then the reports work fine, but none of the other pages that query the db will work. In either case, the error is:
Login failed for user 'NT AUTHORITY\SYSTEM'
I have set both the NT AUTHORITY\SYSTEM user and ASPNET user to db_owner for my database. I'm stumped and don't know what to try next.
Success! I changed all of my connection strings to contain the following:
User Instance = False
I had to do it everywhere - in my aspx pages, web.config and in all my reports. It seems that if it is not specified or if it is set to True, then the connection is made as a user and it locks all other connections out. Hopefully, this will help someone
else.
Marked as answer by veggieCoder on Jul 16, 2010 06:17 PM
veggieCoder
Member
124 Points
91 Posts
Strange Access Issue
Jul 15, 2010 09:26 PM|LINK
Hi Everyone,
I'm not sure I know how to explain this, so please bear with me :-)
I have a .NET web app backed by an SQL Express 2008 database. All of my queries, inserts and updates work fine. I've also set up a few server-side reports, and can access those fine via an aspx page. The problem is that if I access any page that queries the DB before going to the reports, the reports will not work. Conversely, if I relauch the app and go the reports first then the reports work fine, but none of the other pages that query the db will work. In either case, the error is:
Login failed for user 'NT AUTHORITY\SYSTEM'
I have set both the NT AUTHORITY\SYSTEM user and ASPNET user to db_owner for my database. I'm stumped and don't know what to try next.
Thanks in advance.
deependra.kh...
Member
112 Points
27 Posts
Re: Strange Access Issue
Jul 15, 2010 10:07 PM|LINK
Have you checked Restrict access in database properties.
What it is : Multi_User, Single_User, Restricted_User.
Check that may be you will find the solution.
veggieCoder
Member
124 Points
91 Posts
Re: Strange Access Issue
Jul 15, 2010 11:32 PM|LINK
Thanks for the reply. It's set to multi-user.
veggieCoder
Member
124 Points
91 Posts
Re: Strange Access Issue
Jul 16, 2010 06:17 PM|LINK
Success! I changed all of my connection strings to contain the following:
User Instance = False
I had to do it everywhere - in my aspx pages, web.config and in all my reports. It seems that if it is not specified or if it is set to True, then the connection is made as a user and it locks all other connections out. Hopefully, this will help someone else.