Login failed for user 'IIS APPPOOL\obmaster1.onlineob.co.za'. Reason: Failed to open the explicitly specified database 'OBMaster1'. [CLIENT: <local machine>]

Lerato_Dev 1 Reputation point
2021-12-08T14:30:15.877+00:00

I am getting this error when i check my event viewer,aftertrying to run my published websitte on IIS.

Login failed for user 'IIS APPPOOL\obmaster1.onlineob.co.za'. Reason: Failed to open the explicitly specified database 'OBMaster1'. [CLIENT: <local machine>]

Internet Information Services
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,361 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 107.2K Reputation points
    2021-12-08T22:25:09.56+00:00

    If you intend to use integrated security then you should use/create a service account that has been granted access to login to the database.

    Well, apparently integrated security as such work, since the account is apparently able to enter SQL Server. If not, the error message would have been different.

    So it seems that this command should be enough:

    CREATE USER [IIS APPPOOL\obmaster1.onlineob.co.za]
    

    could do the trick.

    Then again, as Joe suggests, you need to have an idea how security is to work in your application.

    0 comments No comments