简体   繁体   中英

How to configure IIS authentication for ASP.NET Core application to use SQL Server

I want to know whats the best way to configure IIS authentication. We have asp.net core application which get deployed through an installer. The problem is that Integrated security= True does not work when app tries to access SQL Server whether on same machine or on LAN. But if connection string is set to Integrated security=False and provide User Id and password which is set in Sql server it works fine. So whats the best way to handle it during Installation when User/Admin get to choose whether to use Sql server or Windows authentication, when user chooses Windows, all installer does is set Integrated security= True in .json file. Do we need to do anything else? which user should it be on a windows server? Thank you very much.

You need to create SQL Server login associated with ASP.Net network service or custom account and map it to databases with corresponding role ('db_owner' role has a full access). See also

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM