Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keep getting "Login failed for user IIS APPPOOL\DefaultAppPool" no matter what I do

I'm trying to give an ASP NET App access to a database (These are test only not production).

It's the first time I try it in this network, and I haven't done it with VS2012, SQL Server 2012 Express, Windows 7 before

What I have done:

  • I upgraded my Sql Server 2012 Express since what VS2012 first installs is a version that doesn't allow access from IIS
  • I found that I had to configure SQL Server 2012 Express to accept remote connections, then I followed a good blog I found here
  • In SSME 2012, I added a new login for all databases NT AUTHORITY\NETWORKSERVICE (I browsed it and found "Servicio de red" which stands for NETWORKSERVICE, so it is actually NT AUTHORITY\Servicio de red)
  • I set dbo as the default schema for this login
  • Under login properties, in User Mappings, I checked my Database (which I named MiniNorthwind) and then checked db_datareader and db_datawriter in Database Role Membership for MiniNorthwind
  • In Internet Information Services Manager I checked that the DefaultAppPool Identity was ApplicationPoolIdentity (It was the default setting)

But I still get an error saying that Login failed for user IIS APPPOOL\DefaultAppPool, if I change the DefaultAppPool identity to NetworkService, then the error changes to Login failed for user NT AUTHORITY\Servicio de red

I don't know what else to do. Please, need help here.

Rafael

like image 555
Rafael Avatar asked Feb 14 '14 14:02

Rafael


2 Answers

application pools -> your application pool used in application -> click it and then click 'Advance Settings' in panel. Find 'Identity' property and change it to localsystem.

like image 194
Thakur Rock Avatar answered Nov 05 '22 20:11

Thakur Rock


In IIS Manager set DefaultAppPool identity as NetworkService. Although it works, you should try to make it work with AppPoolIdentity, since it the Windows 7 attempt to make it safer

like image 28
Rafael Avatar answered Nov 05 '22 21:11

Rafael