StevensNet.com

...Because someone's gotta tell the story...

Blogs

To return to the main Blog List, click Full Blog Listing.

Tags

Error
IIS
SQL
Technical
Troubleshoot
Troubleshooting
Windows

Troubleshooting SQL Error: 18456, Severity: 14, State: 5

Thursday, May 19, 2016 in Technical Articles (Views: 1355)
In moving my dev system today, another odd thing came up. This is usually an easy fix, but for those out there who love their "red herrings", this can throw you, so I hope this helps someone else.

When connecting to the database, I received this error:
Error: 18456, Severity: 14, State: 5.
Login failed for user 'DOMAIN\COMPUTERNAME$'. Reason: Could not find a login matching the name provided. [CLIENT: 127.0.0.1]


Generally, this is as easy as adding the computer account in SQL, giving it the right permissions, and being done. Not so simple sometimes with IIS involved.

When looking at the advanced properties of the Default Web Site, I am using an application pool called "DefaultAppPool". Yes, I know - quite creative. This is the account I need to add into SQL and give it proper database permissions.

So a simple SQL command away, and we're done...
CREATE LOGIN [IIS APPPOOL\DefaultAppPool] FROM WINDOWS

Give this account proper permissions to the database, and you're good to go.

 

Related Blogs You May Be Interested In:


To leave a comment, please log in and/or register.