I'm trying to switch my MSOLEDBSQLB connection string to support older ADO Recordset & MS DataShape connections to use TRUSTED style connection string and not able too. I have SQL native client trusted connection working for my .NET Connection. But need it to work for OLEDBSQL. By the way I installed the latest OLE DB Driver as well. That is why it added another version "MSOLEDBSQL.1" reference to provider.
Note this connection string is working in .net application on same app server connection string for sql native ver. 10 so I'm assuming permissions working (Server=DBSERVER1;Database=MyDB;Trusted_Connection=True;)
This connection works! Note this is a Windows Server/SQL Server 2019. So the Provider is referencing the latest working MSOLEDBSQLBdriver.
WORKS if using SQL Credentials
Data Provider=MSOLEDBSQL.1;DataTypeCompatibility=80;Provider=MSDataShape;Data Source=DBSERVER1;Database=MyDB;MARS Connection=True;MarsConn=Yes;User Id=myDBSQLUser;Password=#########;"
Web application. Connection string to ADO Recordset with queries using MSDataShape requirement. SQL Server and Web Application share Active Directory. As I mention the security works with NATIVE client connection to SQL, just can;t figure out how to make the OLEDB to use trusted with MSDataShape
Yes IIS v10 with .NET 4+ as the target framework. So Windows VMs running SQL 2019 in Azure. The application pool is running under a service account in AD. The service account has DB OWNER on the database target.
I think Trusted_Connection overrides app pool and instead uses the default NT AUTHORITY\ANONYMOUS LOGON' which is probably what IIS service is running as.
What user do you have set in the application pool when using Trusted_Connection ?
Basically your issue is not related to SQL but permissions in the windows OS