User rights/ Cannot insert

andycharger

Centurion
Joined
Apr 2, 2003
Messages
152
I have build an application that works fine on my local machine. It is an ASP.net solution with a SQL Server databse.
I have created the same solution on my domain server so people can use it as an intranet site.
However.....
When they log on (which they can do) and select pages with data driven info, it all works fine.
However.....
When they try to answer questions and store information, i get an error. I have traced it down to an insert statement.
So it appears that my database lets me SELECT but not INSERT.

Can someone help me understand what user permissions I need to create on SQL server or what I need to change in my application?

On my local machine, there seems to be a user called ASPNET in SQL Server. On the Domain server, there does not seem to be one but in Active directory one called ASPNET does exist!

Help me please. Im pulling my hair out!
 
Couple of things:
1. Are you using Integrated Security in your connection to SQL Server?
1a. If so, does your SQL Server reside on the same box as IIS?

2. How does your site send your updates (sql-string or stored procedure)?


Depending on how you secure your site and database there's a few things you can do.

You can setup an ID in SQL Server that has rights to your database, and use that ID in your connection-string from your app. Then you'll have to grant that ID permissions (table-level or storProc depending on how you do it). Or, if you use SPs, create the SPs as that ID and the permissions become implicit to the SPs since that ID created them.

Another way, a bit more time consuming, is to add users to the database and give them table/SP permissions, or do so with a domain group if applicable.
 
Back
Top