I’m trying to use a service account to authenticate a .NET 8 console application (output type set to “Windows Application”) with a SQL Server. (The application is run by “Task Scheduler”.)
I have been looking into using Microsoft.AspNetCore.Authentication.Negotiate but as I am using IHost for dependency injection, I am not able to use “UseAuthentication()” which is used in all the example that I have found.
I have not been able to find any documentation or guides that show how this should/can be done – in a console application. I have found several guides that shows how to use Windows Authentication with ASP.NET application.
Question:
Can someone point me in the right direction as how to use Windows Authentication with a console application (WinExe)?
xpldngerror is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.