I’m working on Mvc web app ,
I have deployed it on IIS 6 which is giving me an error
Cannot open database "aspnetdb.mdf" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\ASP.NET v4.0'.
I also enable authentication :
anonymous and also for ASP.NET Impersonate
My connection string is
<connectionStrings>
<add name="ApplicationServices"
connectionString="data source=.\SQLEXPRESS;Integrated Security=True;initial catalog=aspnetdb.mdf"
providerName="System.Data.SqlClient" />
</connectionStrings>
please help me
I need to upload this app on server.
You need to give security access to the database for the IIS App pool identity:
http://learn.iis.net/page.aspx/624/application-pool-identities/
Using the SQL Express manager, and the security section.
see this thread:
http://www.justskins.com/forums/sql-iis-application-pool-84726.html
and this
http://kannabirank.wordpress.com/2011/06/12/add-app-pool-identity-to-sql-server-db_owner-role/