1

I have an ASP.NET Web application hosted in IIS. Application is running under LocalSystem account. Application is trying to connect to a database on SQL Server with Integrated Security=True. I have added the machine account to sql server and also made it sysadmin. I have provided access to the specified database. Still I am getting error: Failed to open the explicitly specified database.

Please help.

Tim Ferrell
  • 1,348
  • 3
  • 17
  • 40
dkthedon
  • 71
  • 1
  • 6
  • 2
    Integrated security = True so that means LocalSystem has to be a user on your domain. I am guessing it is not. So better not use Integrated security but provide user and pass in your connectionstring – GuidoG Aug 16 '17 at 15:50
  • LocalSystem account uses Machine account to access resources on network. So I have added Domain\Machine$ to my sql server logins. Error Message shows the same account name. – dkthedon Aug 16 '17 at 15:58
  • That wont help you. When using integrated security no logins on your sql-server are used, windows domain users are used. If you realy want to keep integrated security than user LocalSystem will have to be a domain user. Good luck with that – GuidoG Aug 17 '17 at 06:50
  • When Integrated Security= True, Windows account is used. When a machine joins a domain, an additional account with name [Domain\MachineName$] is also created in domain. LocalSystem uses this account when Integrated Security=True – dkthedon Aug 17 '17 at 06:55
  • Great then everything works then, right ? – GuidoG Aug 17 '17 at 08:37
  • everything works when IIS and SQL Server are on different machines. But not when they are on same machine. – dkthedon Aug 17 '17 at 14:53
  • That is indeed very odd. But is there a reason why you want to use integrated security and not want to use login/pass in the connection string ? – GuidoG Aug 17 '17 at 15:04

0 Answers0