Monday, March 19, 2012

[SqlException (0x80131904): User does not have permission to perform this action.]

Folks,

This is driving me nuts. I posted the other day on a related issue, which I belive turned out to be a file permission. I am trying to test my asp.net site under IIS before deploying it. I am now getting the above message which breaks on the opening page on opening a connection to the sql server database. I have permissions set on the database for MachineName\ASPNET and NT AUTHORITY\NETWORK SERVICE as Ken Tucker suggested. Still getting the message. This certainly looks like a sqlserver permission issue but I am at a loss as to how to grant IIS or the specific web app permission to access the database.


Any assistance is truely appreciated. I have spent way to many hours on this. If you don't have the answer but can suggest a resource where I can research it that would help also.


Thanks

What permissions have you set for the ASPNET user?

bullpit

|||ASPNET user has connect permission.|||

I asked because I had a similar situation and what I did was to go to SQL Server Enterprise Manager, navigate down to the database I was using, and then to its "users" tab, and for the ASPNET user, I right clicked and set the all the permissions to Insert, Update, Delete, Select and Execute. I dont know if you already done this or not. If not, you can give this a try.

Good luck,

bullpit

|||

Also, if you know your application is not going to do any inserts or updates to the database then I would suggest you try with minimal permissions (probably only Select). This will make your database less vulnerable.

good luck...

bullpit

No comments:

Post a Comment