I am trying to connect to a database from an ASP.NET web application. However, I am getting the following exception:
Cannot open database "Books" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\ASP.NET v4.0'.
This is the connection string that I am using:
<add name="DB_Connection" connectionString="data Source=.\ANTONIO;Initial Catalog=Books;Integrated Security=true" providerName="System.Data.SqlClient"/>
This is a screenshot of the server that I am trying to connect to:
What am I doing wrong? Is the connection string wrong? Or is it something else?
Update
This project was deployed on IIS server. I removed it from IIS server and started it as a normal project. It works so the problem is not the connection string.
It seems that the IIS server account is not able to access my database. How can I solve this please?