July 2, 2009 at 2:18 pm
I am trying to give access to my web app to a SQL Server DB. I have tried the right-click and selected permissions but I am not sure how to select my application to give rights to. I am thinking I need to register it somewhere but not sure where to go.
I would appreciate a step by step on how to grant access to an ASP.Net App to a SQL Server DB. Note -- I am the owner of the DB.
Thanks,
July 2, 2009 at 2:28 pm
Lets start with terms..
SQL Login = account that allows you to access the server, but not really any databases.
Database User = a user account in a database tied to a SQL Login, this provides the linkage between a login and access into a database, you still don't really have access to anything IN the database..
Database Role = a name of similarly related permissions, such as role_Reports, or role_WebApp, database users are given membership to roles.
You can now create objects, tables, views, sprocs, in the database and give the appropriate user appropriate permissions each.
As a strong design goal recommendation, since you are building a web app, DO NOT build the queries in the web page and send them to the database, use stored procedures to perform the logic in the database. The primary reason for this is security, also there is then no reason to give the webapp user access to the tables, only the sprocs. That way if the login information is ever compromised or your app is hacked you have limited the potential damage..
Clear?
CEWII
July 3, 2009 at 7:23 am
I appreciate the answer it turns out I required my Administrator to set up the login account for the app I didn't have appropriate rights on the server to do myself. I was actually interested in the actual mechanics of how to do it.
Thanks,
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply