Permissions needed to connect to ASPNETDB on SQL Server 2005

Hi all.  I've just created ASPNETDB on my SQL Server 2005 and currently it has the following users: dbo, guest, INFORMATION_SCHEMA and guest.  I'm assuming in my web.config file that I have to provide a username and password to this database.  However, it seems that I can't add the current username and password that I am using to connect to the database to the ASPNETDB in the usual way.  Can someone help me with this as I'm a newbie at this and can't find this information anywhere.

Thanks so much.
Finlay11Asked:
Who is Participating?
 
nmarunCommented:
Once you log on the sql server in sql server 2005 management studio, go to:
security -> Logins -> right click to 'New Login'
Add login name, select Windows / SQL Server Auth (pwd reqd)
Click on 'Server Roles' and select appropriate role
Click on 'User Mapping' and associate the ASPNETDB database to the user you just created.

Change the connection string in your web.config as follows:

<add key="ASPNETDBConxn" value="Data Source=myServerAddress;Initial  Catalog=ASPNETDB;User  Id=myUsername;Password=myPassword;" />
0
 
aibusinesssolutionsCommented:
You'll want to add the ASPNET user, the "NT Authority\Network Service", or the IIS WP user to your DB as a user, and then give it access to your database.  It depends on what OS, and what version of IIS you are using.
0
 
bedanandCommented:
There are two types of security  modes on sql server.
1. Windows authentication mode  
2. Mixed mode(sqlserver and windows authentication mode).

You must  set to mixed mode on the sql server to be able to login from asp.net application providing username/password combination on web.config.



0
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.

All Courses

From novice to tech pro — start learning today.