Error :-
Login failed for user 'IIS APPPOOL\ASP.NET v4.0'.
Under ApplicationPoolIdentity you will find local system. This will make your application run under
Login failed for user 'IIS APPPOOL\ASP.NET v4.0'.
Solution:-
You can change the ApplicationPoolIdentity from IIS7 -> Application Pools -> Advanced Settings.
Under ApplicationPoolIdentity you will find local system. This will make your application run under
NT AUTHORITY\SYSTEM
, which is an existing login for the database by default.