0

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.

1 Answer 1

1

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/

Sign up to request clarification or add additional context in comments.

1 Comment

hi Richard I did it all above then also getting same error :( My database is aspnetdb i.e i'm using sql membership database. which is in my App_Data folder only

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.