Type of user for database access in web.config

what type of user do I create that is the one that is used for login and password in the connection string for an asp.net web application?

what permissions do I give that user?

is it admin? dbowner?

this is a new sql server 2012 database.

thanks!
LVL 2
Starr DuskkASP.NET VB.NET DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Deepak ChauhanSQL Server DBACommented:
This is depend if requirement only select, insert, update, delete data from the database, You can grant DB_reader and DB_writer database role to the user. Otherwise modify table structure \ Create tables\ change database settings require DB_owner role.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vitor MontalvãoMSSQL Senior EngineerCommented:
what type of user do I create that is the one that is used for login and password in the connection string for an asp.net web application?
You can use a SQL Server login or a Windows Account that has permissions on the database. For a Windows Account you won't need to provide the password since it will be managed by the Active Directory.

what permissions do I give that user?
What kind of permissions that user needs?

is it admin? dbowner?
Do you want him to have full access to your SQL Server or the database?
0
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
I asked:

>.what type of user do I create that is the one that is used for login and password in the connection string for an asp.net web application?

That would mean they have to be able to access the database for an anonymous user who happens to use my website so that they can see the menu items retrieved. Then when that user registers to create an account, they have to be able to save things. Then when that user wants to search, they have to be able to run stored procedures.

Basically a user who is going to be using the website and needs to be able to get to the data and alter it from the web application.
0
Vitor MontalvãoMSSQL Senior EngineerCommented:
So you wouldn't need an user with admin privileges. Create a SQL Login with read and write permissions on the database.
0
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
I created a user with read, write and execute permissions. I had to create a role for db_execute first and add that to that user on each actual database.

CREATE ROLE db_executor;
GRANT EXECUTE TO db_executor;

thanks!
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.