• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 534
  • Last Modified:

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.
0
Finlay11
Asked:
Finlay11
1 Solution
 
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now