That message tells me that the step #1 (the one with db login) was not done or done not properly. You need to repeat it again, including assigning to a "dbo" role and adding login to a PhoneDirectory database.
If you are sure, that all is done and nothing is working, you can try to use regular sql user with a password. In this case you need to setup a regular SQL account with login name and password. After that you should try to login to the database in SQL Management
Tool using that username/password. Once all is working, you can set up this user in the web.config file. In this case the database connection should definitely work...
It is the same as with integrated account. Security - Logins. Add new user and select SQL type and not Windows that you can setup a password. In User Mapping mark PhoneDirectory in the list. Type"dbo" as Default Schema. Select "public"
in role membership. In Databases - Security - Users select your new user and then on the General tab select in the role membership list db_datareader and db_datawriter roles. These roles are to read, add, change, or delete data from all user tables in the
database.
Login to server using with account. If works - change web.config. If doesn't - make screenshots for each step you completed.
Try to login as veso2 again. Go to Administrative Tools - Event Viewer and see if you have something like "Login failed for user 'veso2'. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only."
Then go to SQL Management Studio, select your server in the left hand area - Properties - Security - Server Authentication. If you have selected "Windows Authentication mode" only then you may not login as veso2. You need to select second option and restart
the SQL Server.
Marked as answer by Mikesdotnetting on Aug 23, 2010 06:16 PM
Parts "Grant Access to the Databases" and "To assign permissions to the IIS worker process account
" from this article should help you - in simple words you should provide ASPNET account Login and Role for reading the data from your database - otherwise you will not be capable get your page working (properly retrieve and display the data).
smirnov
All-Star
23588 Points
4050 Posts
Re: Unable to make connection to database?
Aug 19, 2010 06:44 PM|LINK
That message tells me that the step #1 (the one with db login) was not done or done not properly. You need to repeat it again, including assigning to a "dbo" role and adding login to a PhoneDirectory database.
If you are sure, that all is done and nothing is working, you can try to use regular sql user with a password. In this case you need to setup a regular SQL account with login name and password. After that you should try to login to the database in SQL Management Tool using that username/password. Once all is working, you can set up this user in the web.config file. In this case the database connection should definitely work...
Veschich
Member
29 Points
279 Posts
Re: Unable to make connection to database?
Aug 20, 2010 07:21 AM|LINK
How to create this new account?
smirnov
All-Star
23588 Points
4050 Posts
Re: Unable to make connection to database?
Aug 20, 2010 09:28 AM|LINK
It is the same as with integrated account. Security - Logins. Add new user and select SQL type and not Windows that you can setup a password. In User Mapping mark PhoneDirectory in the list. Type"dbo" as Default Schema. Select "public" in role membership. In Databases - Security - Users select your new user and then on the General tab select in the role membership list db_datareader and db_datawriter roles. These roles are to read, add, change, or delete data from all user tables in the database.
Login to server using with account. If works - change web.config. If doesn't - make screenshots for each step you completed.
Veschich
Member
29 Points
279 Posts
Re: Unable to make connection to database?
Aug 20, 2010 11:54 AM|LINK
I'm sorry. It's not working. Here see the screenshots. I tried twice. Don't know what to do.
http://dox.bg/files/dw?a=d345c4846c
Veschich
Member
29 Points
279 Posts
Re: Unable to make connection to database?
Aug 22, 2010 07:25 PM|LINK
I guess no one help. I'll try new post.
smirnov
All-Star
23588 Points
4050 Posts
Re: Unable to make connection to database?
Aug 23, 2010 02:45 PM|LINK
Try to login as veso2 again. Go to Administrative Tools - Event Viewer and see if you have something like "Login failed for user 'veso2'. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only." Then go to SQL Management Studio, select your server in the left hand area - Properties - Security - Server Authentication. If you have selected "Windows Authentication mode" only then you may not login as veso2. You need to select second option and restart the SQL Server.
Veschich
Member
29 Points
279 Posts
Re: Unable to make connection to database?
Aug 23, 2010 02:53 PM|LINK
10x guyes. I solved the problem. :)
Bigtrend
Contributor
2551 Points
436 Posts
Re: Can't connect with DB again!
Aug 23, 2010 03:03 PM|LINK
You can use the article http://download.microsoft.com/download/3/a/4/3a46267f-9640-4623-86a1-c63bbfea9e1d/Quick_Install_Guide.htm in order to setup Application Pool indentity properly.
Parts "Grant Access to the Databases" and "To assign permissions to the IIS worker process account " from this article should help you - in simple words you should provide ASPNET account Login and Role for reading the data from your database - otherwise you will not be capable get your page working (properly retrieve and display the data).