Dec 09, 2019 04:10 PM|jjkatz|LINK
I have a web app that serves as a front end to a SQL Server 2016 database. The web.config file is set up to use SQL Server authentication. I'd like to know if it's possible to modify the web.config file to use Windows authentication, but here's the catch
- it has to be for a specific Windows user account. Using Visual Studio 2012 and IIS 8.0. Login to the web app is via SSO (single sign-on), so this change would only affect how the web app connects to the database, not how users log into the web app.
I also have a number of executables that query the SQL Server database and then include the query results in the body of an email. These are also set up to use SQL Server authentication, and I'd like to modify these as well to use Windows authentication,
for that same specific user account. A sample current connection string is:
SqlConnection myConn = new SqlConnection("server=" + ServerName + "; uid=[username]; pwd=[password]; database=[database name]");
All help is appreciated! Let me know if you need additional details.