ASP.net and SQL Server 2005: Setting Up an ASPNET Account

I am a bit confused about ASP.NET account in SQL Server 2005. In my website connection string, I am using account sa

to connect to SQL Server database. When I use Firefox to login to my site, I get the error

Login failed for user: 'AccountName'

I found the answers on the ms support site. He mentioned 3 methods to fix this method and one of them is providing correct permission in SQL Server for ASPNET.

I selected public for the server role, database connection allowed and account enabled, and I also selected database when mapping users. I am still getting permission error in my database stored procedure.

What am I missing?

Edit: I have set ASPNET

db as owner on my database and everything works. If I just set up read and write it doesn't work. Does the account ASPNET

pose a security risk to the owner of the db?

0


source to share


1 answer


First, do not ever be connected as SA from a web application that creates a huge security risk.

It looks like your connection string is messed up, that it is using NT authentication and not the specified user / password combination.



You don't need to set the application pool account as dbo if you don't have direct access to the tables; rather, add it to the public group for this database; this way you can limit it appropriately.

+2


source







All Articles