The problem is that the IIS account being used to access SQL Server (IIS APPPOOL\demo
) does not have access to it.
You need to either:
- grant permission for the user
IIS APPPOOL\demo
to your SQL Server - use impersonation to connect to SQL Server with a user account that has access
- use SQL Server Logins to access SQL Server using a named user (not recommended these days)